GGC Selection

Hi Iam using GGC.I''ve 10 records inthe grid with one of the field as boolean.I want to make the records which are true to read only.ie,in the same grid 5 records should be readonly & 5 should be editable.How can I do this? Thanks

1 Reply

ST stanleyj Syncfusion Team January 13, 2006 06:02 PM UTC

Hi Preethi, By handling the QueryCellStyleInfo event, the styles of the row can be changed. Here is a sample. private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.Column != null && e.TableCellIdentity.DisplayElement is GridRecordRow) { DataRowView dr = e.TableCellIdentity.DisplayElement.ParentRecord.GetData() as DataRowView; if(dr!=null && Convert.ToBoolean(dr["Col3"])) { Console.WriteLine("reached"); e.Style.BackColor=Color.Turquoise; e.Style.ReadOnly=true; } } } Best regards, Stanley

Loader.
Up arrow icon