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.
Syncfusion Feedback

Showing row numbers in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

79270 Jan 27,2009 06:05 PM UTC Jan 29,2009 12:40 PM UTC Windows Forms 3
loading
Tags: Grouping
Sameer Khan
Asked On January 27, 2009 06:05 PM UTC

How does one display row numbers in a GGC?

-S


Rajadurai C [Syncfusion]
Replied On January 28, 2009 10:38 AM UTC

Hi Sameer,

Thanks for your interest in Syncfusion products.

The row numbers in gridgroupingcontrol can be displayed by handling QueryCellStyleInfo event with the following code:

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.ColIndex == 0 && e.TableCellIdentity .RowIndex >3)
{
e.Style.CellType = "Header";
e.Style.Text = e.TableCellIdentity.RowIndex.ToString ();
}
}



Regards,
Rajadurai


Sameer Khan
Replied On January 28, 2009 10:30 PM UTC

How do I make the size of this column such that it is wide enough for the row numbers.

I tried handling QueryColWidth event; it increased the size of the row number column; but chopped off the last column's size.

-s

>Hi Sameer,

Thanks for your interest in Syncfusion products.

The row numbers in gridgroupingcontrol can be displayed by handling QueryCellStyleInfo event with the following code:

void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.ColIndex == 0 && e.TableCellIdentity .RowIndex >3)
{
e.Style.CellType = "Header";
e.Style.Text = e.TableCellIdentity.RowIndex.ToString ();
}
}



Regards,
Rajadurai




Rajadurai C [Syncfusion]
Replied On January 29, 2009 12:40 PM UTC

Hi Sameer,

You can set the size of the row number column through the following code.

this.gridGroupingControl1.TableOptions.RowHeaderWidth = 20;

This doesn't affect the size of other columns.

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.

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

;