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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disabling a Row in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

39916 Jan 20,2006 12:24 PM UTC Jan 20,2006 09:00 PM UTC WinForms 1
loading
Tags: GridControl
Ashish Mody
Asked On January 20, 2006 12:24 PM UTC

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 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

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.

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

;