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.
Syncfusion Feedback

Making a particular cell in data grid control making enabled/disabled in windows c# programming

Thread ID:

Created:

Updated:

Platform:

Replies:

212 May 1,2002 10:50 PM May 2,2002 06:57 AM Windows Forms 1
loading
Tags: FAQ
Administrator [Syncfusion]
Asked On May 1, 2002 10:50 PM

How to make a particular cell OF A DATAGRID CONTROL IN wINDOWS C# PROGRAMMING (depending upon the value of a cell in a particular column and a particular row ) making enabled or disabled. Thanks

Clay Burch [Syncfusion]
Replied On May 2, 2002 06:57 AM

You can do this by deriving a columnstyle and overriding the Edit method, and somehow deciding whether to call the baseclass or not. Not calling the baseclass will make the cell unable to go into edit mode. Exactly how you decide whether to call the baseclass or not is your choice. You can get the datagrid object by referencing the TableStyle.DataGrid member of the columnstyle. A more elegant way might be to add an event to your derived columnstyle, and let the user add an event handler to determine whether a cell should be enabled on a cell by cell basis. This FAQ has a sample of this technique. George Shepherd's Windows Forms FAQ contains an entry entitled: How can I prevent a particular cell from being editable? Check it out at: http://www.syncfusion.com/faq/windowsforms/search/758.aspx

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

;