Adding Custom Column in DataGrid
I need to add a column which will display the total of two fields. I am using a typed dataset, could you please help me with that? THanks.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Andrzej WegierskiRank #1,729 · 877 pointsPosted Sep 19, 2005, 12:31 AM EDT
myDataTable.Columns.Add("newcolumn",typeof(Decimal),"column1+column2");
In typed DataSet I can't get such field, syntax used below causes an error. May be change something in it:
<xs:element name="Column" msdata:ReadOnly="true" msdata:Expression="column1+column2" type="xs:string" minOccurs="0" />