datagrid unbound collumn

larris

Member
Joined
Mar 13, 2006
Messages
23
Programming Experience
1-3
hello to all

I have datagrid witch is already populated with data.I have added an unbound collumn and i want to populate it with caclulated data from the other collumns
for each row when i press a button.does enyone have a clue on how to do this?
 
If each row gets the same calculation preformed it may be wiser to perform the calculations in you select statement whe you get the data for the DataGrid. Add a calculation field to your select statement.

Otherwise you could possibly create a dataTable with the fields from the datagrid and a calculated field, loop through the grid and do the calculations, add the calculated field to the datatable, rebind the datagrid to the updated datatable.
 
I thought of that but the calculations are not so simple.They are inside a function witch reads not only the datagrid fields but also from the database from other tables.And also i want to perform the calculations when i press a button.I manage to put the results to textboxes but not in the datagrid for each row seperetly
 
Back
Top