Showing row numbers in GGC

How does one display row numbers in a GGC?

-S


3 Replies

RC Rajadurai C Syncfusion Team 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



SK Sameer Khan 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





RC Rajadurai C Syncfusion Team 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


Loader.
Up arrow icon