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

Set defalut value for checkbox in gridGroupingControl

Hi, I have checkbox column in a gridGroupingControl.I want to set the value of the checkbox checked on load of the form. How can I do it..? I tried to set as below..but it is not working. GridTableCellStyleInfo checkBoxStyle = new GridTableCellStyleInfo(); checkBoxStyle.CellValueType = boolType; checkBoxStyle.CellType = CHECKBOX_TYPE; checkBoxStyle.BackColor = Color.White; checkBoxStyle.CellValue = "True"; checkBoxStyle.Borders.All = new GridBorder( GridBorderStyle.None ); Thanks, Prathima

1 Reply

AD Administrator Syncfusion Team August 10, 2005 07:47 AM UTC

You have to set the value in your datasource. Or, you have to get the GridRecord of the record object whose boolean field value you want to set, and use record.SetValue to set its value. If you want to so this to all records, after setting the DataSource to the grid, you can loop through grid.Table.Records and call record.SetValue on each record.

Live Chat Icon For mobile
Up arrow icon