Columns number

How to get the number of columns on the left side of the grid?

3 Replies

HA haneefm Syncfusion Team May 21, 2007 03:32 PM UTC

Hi Hrcko,

You can try the.Model.Colcount property to get a total column count in a grid. Also you can use the ViewLayout.VisibleCols property to find number of visible column count in a grid. Here is a code snippet.

int visibleColCount = this.grid.ViewLayout.VisibleCols;
int totalColcount = this.grid.Model.ColCount;

Best regards,
Haneef


HR Hrvoje May 22, 2007 07:51 AM UTC

I want to see numbers on the left side of the grid.
And I ment rows not columns.
So, if I have 20 records in grid, I would like to see number 1-20 beside every row.


HA haneefm Syncfusion Team May 22, 2007 05:57 PM UTC

Hi Hrcko,

If you like to have numbered rowheaders in a GridDataBoundGrid, try these property settings. This will help you.

this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo.CellType = "Header";
this.gridDataBoundGrid1.Model.Options.NumberedRowHeaders = true;

Below is the forum thread that discuss with this task in GridGroupingControl.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=52552.

Best regards,
Haneef

Loader.
Up arrow icon