RC
Rajadurai C
Syncfusion Team
May 22, 2009 09:05 AM UTC
Hi Michael,
Thanks for your interest in Syncfusion products.
If your intention is to disable certain rows in grid, then please try the following code in handled in QueryCellStyleInfo event.
void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.AlternateRecordFieldCell)
{
if (e.TableCellIdentity.ColIndex > 0)
{
Element el = e.TableCellIdentity.DisplayElement;
Record r = el.GetRecord();
if (r != null)
{
int row = e.TableCellIdentity.Table.UnsortedRecords.IndexOf(r);
if (row == 7)
e.Style.Enabled = false;
}
}
}
}
This checks for record at index 7 and disables it.
Regards,
Rajadurai
ME
Michael Egloff
May 25, 2009 10:47 AM UTC
Hej Rajadurai,
that's exactly what is was looking for!
Thanks a lot.
Michael