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.

GridGroupingControl CustomCellType

Thread ID:

Created:

Updated:

Platform:

Replies:

48726 Sep 4,2006 02:57 AM Sep 5,2006 02:21 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 4, 2006 02:57 AM

hi!

i would like to apply a CustomCellType to a GridGroupingControl.
i do as the following:

private void BuildDatagrid()
{
LinkLabelCellModel dgSentCell = new LinkLabelCellModel(dgSent.TableModel);

dgSent.TableModel.CellModels["aa"] = dgSentCell;
}

void TableControl_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex == 1 && e.RowIndex >2)
{
e.Style.CellType = "aa";
e.Style.TextColor = System.Drawing.Color.Blue;
}

}

It''s working well if there is no Group Column.
I have attached some image files to explain my problem..
The file "Right.jpg" is i expected. The "Wrong.jpg" is the problem.

Thanks!

CustomCellType.zip

Administrator [Syncfusion]
Replied On September 4, 2006 04:39 AM

Hi Lim,

Try the below code snippet to solve this.

GridTableCellStyleInfo info = e.Style as GridTableCellStyleInfo;

//To check for the record .
if( info.TableCellIdentity.DisplayElement != null && info.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record )
{
//to check for particular column name "Col1"
if( info.TableCellIdentity.Column != null && info.TableCellIdentity.Column.Name == "Col1" )
{
e.Style.CellType = "aa";
e.Style.TextColor = System.Drawing.Color.Blue;
}
}

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On September 4, 2006 05:20 AM

hi! May i know the namespace of the GridTableCellStyleInfo

Thanks!

Administrator [Syncfusion]
Replied On September 4, 2006 07:22 AM

Hi Lim,

Yes. The namespace of the GridTableCellStyleInfo is "Syncfusion.Windows.Forms.Grid.Grouping"

Thanks,
Haneef

Administrator [Syncfusion]
Replied On September 5, 2006 02:21 AM

Hi! It''s Working!

Thanks a lot! :)

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.

;