Hi James,
Regret for the inconvenience caused.
The reported scenario can be achieved by using QueryCellStyleInfo event with certain limitation. The selection can be added based on the checkbox value only on the grid is in static mode.
When adding the new rows, you can select the checkbox values. The grid will update selected records at the end of the update. Please refer to the following code snippet,
Code Snippet:
//Set to true only on adding the new rows
bool updating = false;
this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.Style.CellType == GridCellTypeName.CheckBox && !updating )
{
e.Style.TableCellIdentity.DisplayElement.GetRecord().SetSelected(e.Style.Text == "True");
}
}
Sample Link:
Regards,
Adhi