simple DataGridView question.
-
Hi, I have a grid, that has a column of checkboxes. I also have a button outside the grid, that if clicked should toggle the grid view to show only the rows that have checkboxes checked. What whould be the best way to achieve that? Set the grid's datasource to a dataview with the filter set? Any code samples will be really appreciated. Thank you very much. :-D
-
Hi, I have a grid, that has a column of checkboxes. I also have a button outside the grid, that if clicked should toggle the grid view to show only the rows that have checkboxes checked. What whould be the best way to achieve that? Set the grid's datasource to a dataview with the filter set? Any code samples will be really appreciated. Thank you very much. :-D
The easiest way is to assign a name attribute to all of the check boxes in the grid that is the same. You can then get a collection returned in javascript and do the assignment without a postback.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego. -
The easiest way is to assign a name attribute to all of the check boxes in the grid that is the same. You can then get a collection returned in javascript and do the assignment without a postback.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego. -
On the checkbox click event assign the underlying datasource to have the value alternated and then Rebind or Refresh the datagrid.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.