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.

how to set GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

93830 Apr 7,2010 03:57 AM Apr 7,2010 11:38 PM ASP.NET Web Forms (Classic) 3
loading
Tags: Grouping
zhheng
Asked On April 7, 2010 03:57 AM

to set GridGroupingContol:
1. the GridGroupintConrol have only one table ,i want to make some cells can use and to make other cells cannot use,?
2,how to set some cells of colour,size ,font,text?

thank you!

Rajadurai C [Syncfusion]
Replied On April 7, 2010 08:52 AM

Hi,

Thanks for your interest in Syncfusion Products.

To handle styles for individual cells in GridGroupingControl, you can make use of GridStyleInfo properties in QueryCellStyleInfo/PrepareViewStyleInfo event. Following is the code handled in QueryCellStyleInfo event to achieve the same.

if (e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellType.AlternateRecordFieldCell)
{
Record rec = e.TableCellIdentity.DisplayElement.GetRecord();
if (e.Style.Text.Contains("2"))
e.Style.BackColor = Color.Red;
if (rec.GetSourceIndex() == 4)
e.Style.Font.Bold = true;
if (e.TableCellIdentity.Column.Name == "Department")
e.Style.ReadOnly = true; //e.Style.Enabled = true;
}

Sample:
http://help.syncfusion.com/support/samples/Grid.Windows/8.1.0.30/F93830.zip

Regards,
Rajadurai

zhheng
Replied On April 7, 2010 09:47 PM

thank you very much!

Rajadurai C [Syncfusion]
Replied On April 7, 2010 11:38 PM

Hi,

Thanks for your update.

Regards,
Rajadurai

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.

;