Two alternatives.
First, to add the new row, use
DataRow workRow = workTable.NewRow();
I'm assuming your columns are all of int type, so you won't be able to
just stick a % sign in the row. So an alternate technique (or perhaps
you need to combine the two) would be to handle the ItemCreated event.
Here is a good article on the subject:
Summary Rows in DataGrid Controls
http://msdn.microsoft.com/library/de...ta01102002.asp
--
Scott
http://www.OdeToCode.com
On Sat, 14 Feb 2004 03:41:06 -0800, "Ashok" <(E-Mail Removed)>
wrote:
>I am using the datatable to display the details something like this
> Total X Y Z
>GR 200 100 50 50
>CS 100 50 25 25
>FG% (cs/GR) 150% 50% 50% 50%
>
>In the above table I am calculating the FG% while creating the row. In the end I use the table.Column.add("total") to get the totals for all the rows. But while the rows 1 and rows 2 totals are fine, you cannot add the % row in the same manner. I am virtually at my wits end as how to get the correct % in the totals column.
>
>TIA
>Ashok