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.
Unfortunately, activation email could not send to your email. Please try again.

Disabling a Row in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

39916 Jan 20,2006 07:24 AM Jan 20,2006 04:00 PM Windows Forms 1
loading
Tags: GridControl
Ashish Mody
Asked On January 20, 2006 07:24 AM

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

stanleyj [Syncfusion]
Replied On January 20, 2006 04:00 PM

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

CONFIRMATION

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.

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.

;