sandeep437
asked on
datagrid column
hi
I have a datagrid with three columns.
Gross Amt. Net Amt. Difference.
I have to display in the Difference column the difference between GrossAmt and Net Amt. How to do it.
tx
sandeep
I have a datagrid with three columns.
Gross Amt. Net Amt. Difference.
I have to display in the Difference column the difference between GrossAmt and Net Amt. How to do it.
tx
sandeep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try this:
Dim row1 as Datarow = ds.Tables("Name of your table").Row("whichever row you want")
ds.Tables("Name of your table").Columns("Differenc e") = row1("Gross Amt") - row1("Net Amt")
I hope that helps!
Dim row1 as Datarow = ds.Tables("Name of your table").Row("whichever row you want")
ds.Tables("Name of your table").Columns("Differenc
I hope that helps!
'fill your dataset with following querry it will solve your problem
select GrossAmt,NetAmt,GrossAmt-N etAmt as [Difference] from table_name
select GrossAmt,NetAmt,GrossAmt-N
ASKER
tx
sandeep