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

How to prevent selection of a record when the row is disabled in the ggc

Thread ID:

Created:

Updated:

Platform:

Replies:

57943 Mar 14,2007 01:39 PM UTC Mar 14,2007 03:05 PM UTC WinForms 1
loading
Tags: Grouping
James Blibo
Asked On March 14, 2007 01:39 PM UTC

I am trying to use the SelectedRecordsChanging event to prevent the selection of a record the the row for that record in the ggc is disabled using the Conditional Format below..

GridConditionalFormatDescriptor gcfd = new GridConditionalFormatDescriptor("DisabledRow");
gcfd.Appearance.AnyRecordFieldCell.BackColor = Color.Lavender;
gcfd.Appearance.AnyRecordFieldCell.Enabled = false;


How can I determine if a row is disabled from this event?

Administrator [Syncfusion]
Replied On March 14, 2007 03:05 PM UTC

Hi James,

Please try this code snippet.

void gridGroupingControl1_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e)
{
if (e.SelectedRecord != null && e.SelectedRecord.Record != null)
{
GridTable table = e.Table as GridTable;
e.Cancel = !table.GetTableCellStyle(e.SelectedRecord.Record, "ColumnName").Enabled;
}
}

Best regards,
Haneef

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

;