Dim DesinNum As DataColumn = New DataColumn
            With DesinNum
                .ColumnName = "DEsign#"
                .Expression = "ISNULL(usrini,'')+design+typcde"
            End With

            With Design_dt.Columns
                .Add(DesinNum)
            End With

These are the results I'm getting
usrini="J", Design=123,typcde=cst expression=j123cst
usrini="J", Design=123,typcde="" expression=""


I have this code to add a new colum in the datagrid.
It seams to work ok except when the typcde is blank the design# is blank.
I'm using this on vb2008
can anyone help me with this expression?

Recommended Answers

All 2 Replies

Try to add an expression column with DataTable's column instance.

Thank you adatapost for your reply
Can you explain.
I'm new at this. This is my first app.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.