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.

hide/show or enable/disable grid column in Edit mode

Thread ID:

Created:

Updated:

Platform:

Replies:

70764 Dec 28,2007 08:49 PM Dec 31,2007 01:33 PM ASP.NET Web Forms (Classic) 2
loading
Tags: GridGroupingControl
Ivan Siew
Asked On December 28, 2007 08:49 PM

Is there a way to programmatically hide/show or disable/enable a specific grid column in edit mode?

Basically, I have a column that is a checkbox. Once the user has completed a certain task, I want to disable or hide the checkbox column in edit mode so that the value (True/False) is still displayed but going into edit mode, the checkbox will not be displayed/rendered.

Thanks.

Ivan


Fathima Shalini P [Syncfusion]
Replied On December 31, 2007 08:06 AM

Hi Ivan,

Thanks for your interest in Syncfusion Products.

It is possible to hide/show a particular column in Edit Mode in GridGroupingControl. The following code snippet is used to acheive this behaviour.


void GridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
if (e.Action == CurrentRecordAction.BeginEditCalled)
{
this.GridGroupingControl1.TableDescriptor.VisibleColumns.Remove("EmployeeID");
}
if (e.Action == CurrentRecordAction.EndEditComplete)
{
this.GridGroupingControl1.TableDescriptor.VisibleColumns.Add("EmployeeID");
}
}


Please find the simple sample in the following link:

http://www.syncfusion.com/Support/user/uploads/TogglingDatasourceWithFilterBar_b09965ca.zip

Please let me know if any concerns.

Regard,
Fathima.


Ivan Siew
Replied On December 31, 2007 01:33 PM

Hi Fathima,

This solution worked for me.

Thanks.

Ivan


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.

;