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.

Custom section problem.

Thread ID:





67907 Sep 4,2007 10:49 AM Sep 7,2007 09:01 PM Windows Forms 4
Tags: Grouping
Asked On September 4, 2007 10:49 AM

I create custom section. This section inherit EmptySection class.

In grid grouping control in QueryCellStyleInfo event I receive my cells of my custom section but e.TableCellIdentity.Column is equal null.

What can I do with problem? Cell column is equal null. How can I get cell column in e.TableCellIdentity.Column?

Replied On September 5, 2007 03:17 AM

Please help

Replied On September 5, 2007 11:00 AM

Answer please.
>Please help

Replied On September 7, 2007 11:54 AM

Please help.

Answer please.
>Please help

Rajagopal [Syncfusion]
Replied On September 7, 2007 09:01 PM

Hi Vladymyr,

We regret for the delay in responding to your query.

The e.TableCellIdentity.Column refers to a GridColumnDescriptor(column) in the GridColumnDescriptorCollection. This is applicable only for RecordFieldCell, ColumnHeaderCell or cells associated with GridColumnDescriptor. If you want to apply any style settings to a column in the custom section then, you may do it by checking for the column index in the QueryCellStyleInfo event handler. Please try the code below.

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
Element el = e.TableCellIdentity.DisplayElement;
if (el != null && el is ExtraSection)
int field = this.gridGroupingControl1.TableDescriptor.NameToField(columnName);
int col = this.gridGroupingControl1.TableDescriptor.FieldToColIndex(field);
if (e.TableCellIdentity.ColIndex == col)
e.Style.BackColor = Color.Red;

Here is a sample

Let me know if this helps.



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.