on 05-11-2006 12:50 PM
Hi,
does any1 know how to get row numbers on a grid?
Setting the "RowsHeader" just gives an error...
Thx in advance.
/Peter Halden
Hi Peter,
If u have bound the grid to a table then u could bind the column to the field which has the line number. This will automatically display the line numbers.
Regards,
Ram.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As the grid with an underliing datatable will show you all columns you fetch, you can try to populate the first column of the datatable with row numbers.
To do so you only have to create a SQL query/Stored Procedure which returns the count of the actual row. One approach can be a selfjoin like this little example:
SELECT count(*) LineNumber,
a.LastName
FROM OHEM a join
OHEM b
on a.LastName >= b.LastName
group by a.LastName
order by a.LastName
I have seen this question asked before and there is no answer, so I suspect that there is currently no way to do this. I too would like to be able to set the text in the row headers of a grid, but cannot find a way to do so. If anyone knows how this can be done, or when it will be supported, please help us both!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.