Thanks but!
Thank you very much for your help!!! I really appreciate.
But the problem is that DataGridView is binded to database source, so when I tried your method an error has occurred.
Here is the code calling the method:
dataAdapter = new SqlDataAdapter( cmd);
try
{
BindingSource bindingSource = new BindingSource() ;
objConnection.O pen();
dataAdapter.Fil l(table);...
User Profile
Collapse
Profile Sidebar
Collapse
Yangkyu Lee
Last Activity: Jul 22 '12, 02:24 AM
Joined: Jan 10 '12
Location:
-
sum filtered rows in datagridview (C#)
I am struggling with the problem of summing filtered rows of datagridview. I can sum the whole datatable with the following program. But I want to summarize only filtered rows of datatable. How can I do that?
...Code:private void sumRows(DataTable table) { DataRow row = table.NewRow(); for (int i = 1; i < table.Columns.Count; i++) { row[i] = 0; } table.Rows.InsertAt(row, 0);
No activity results to display
Show More
Leave a comment: