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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable Row

Thread ID:





81876 May 21,2009 02:20 PM UTC May 25,2009 10:47 AM UTC WinForms 2
Tags: GridControl
Michael Egloff
Asked On May 21, 2009 02:20 PM UTC

Hi there,
I'm pretty new to the syncfusion grid.

I've used the GridGroupingControl grid and added a list of objects to the DataSource. All ok, the data is shown. Now i want to disable certain rows in the grid.

How can I do that? How can I access the row and set it to disable?

thanks for any help!

Rajadurai C [Syncfusion]
Replied On 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.


Michael Egloff
Replied On May 25, 2009 10:47 AM UTC

Hej Rajadurai,
that's exactly what is was looking for!

Thanks a lot.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon