Disabling a Row in GridDataBoundGrid

How can i disable a row in GridDataBoundGrid? I need to do this in RowLeave event. Thanks in advance.

1 Reply

ST stanleyj Syncfusion Team January 20, 2006 09:00 PM UTC

Hi Ashish, You can achieve this by saving the row index of RowLeave event in a datastore and setting the style properties in PrepareViewStyleInfo handler based on the presence of the row index in the data store. Hashtable ht; private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { if(ht.Contains(e.RowIndex)) if(ht[e.RowIndex].Equals("key")) e.Style.Enabled = false; } private void gridDataBoundGrid1_RowLeave(object sender, Syncfusion.Windows.Forms.Grid.GridRowEventArgs e) { ht.Add(e.RowIndex, "key"); } Best regards, Stanley

Loader.
Up arrow icon