We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Setting CheckBox Values too Slow

Hi, I have a parent Child GGC that has a checkbox in both the parent and child. The Checkbox is a mapped column to the datasource and I need to be able to switch the values in this column programatically. IE. Check mark all rows/ Uncheck all rows with this event being fired from a button. See Attachment for table visual Currently I loop through each row in the dv.tables.rows and I set the value to either 1 or 0. I have also tried add/removing the Checked column from the datasource and adding an expression but this makes the column readonly. Is there a way to change a column''s value in the grid. Ie using the grid''s power to change the underlying datasource. Here is a snippet of my current SLOW code. DV = MyDS.Tables(1).DefaultView DV.BeginInit() Dim mydt As DataRow() = DV.Table.Select(DV.RowFilter) Dim Curvedr As DataRow Dim J As Integer For J = 0 To mydt.Length - 1 mydt(J)("Checked") = 1 Next DV.EndInit() Regards, Chris Wescott

Table Structure.zip

1 Reply

AD Administrator Syncfusion Team March 30, 2006 03:54 PM UTC

Hi Chris, Sorry for the very late response. This can be achieved by the following two ways. Approach 1: By using QueryCellStyleInfo event, you can check or uncheck the values. This approach will be faster because it draws only the displaying rows on the screen. Approach 2: The record value of each row is changed by iterating through a loop. But it’s a bit slower process. Thanks for the patience. Best regards, Madhan Sample : CheckBoxOnButtonClick_GGC

Loader.
Live Chat Icon For mobile
Up arrow icon