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

GridGroupingControl CustomCellType

Thread ID:

Created:

Updated:

Platform:

Replies:

48726 Sep 4,2006 06:57 AM UTC Sep 5,2006 06:21 AM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 4, 2006 06:57 AM UTC

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 08:39 AM UTC

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 09:20 AM UTC

hi! May i know the namespace of the GridTableCellStyleInfo

Thanks!

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

Hi Lim,

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

Thanks,
Haneef

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

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.

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

;