What are you trying to do? Insert a value into a cell in datagrid or get serial number from barcode?
Thanks for ur reply.
I want to insert a value in to datagrid cell. when i show a table by a datagrid if it has 10 rows, it needs serial no 1 to 10 in left most side of datagrid.
ex;
s.no name age
1 aaa 10
2 bbb 21
3 ccc 12
4 ddd 15
5 eee 13
6 fffff 16
The actual table having the columns are name and age.when i show the table by a datagrid, i want to display with serial no like the above.
I want to insert a value in to datagrid cell. when i show a table by a datagrid if it has 10 rows, it needs serial no 1 to 10 in left most side of datagrid.
ex;
s.no name age
1 aaa 10
2 bbb 21
3 ccc 12
4 ddd 15
5 eee 13
6 fffff 16
The actual table having the columns are name and age.when i show the table by a datagrid, i want to display with serial no like the above.
I am assuming that this serial number is saved in a database table. If so just add a boundcolumn to your datagrid and set the name of your database column that contains the serial numbers as the DataField.
I want to insert a value in to datagrid cell. when i show a table by a datagrid if it has 10 rows, it needs serial no 1 to 10 in left most side of datagrid.
ex;
s.no name age
1 aaa 10
2 bbb 21
3 ccc 12
4 ddd 15
5 eee 13
6 fffff 16
The actual table having the columns are name and age.when i show the table by a datagrid, i want to display with serial no like the above.
I think you don't customize the datagrid manually, so you have no choice to insert a new column into datagrid.
You should configure your datagrid manually. By this way you can add any custom column as you like.
eg:
Datagrid.Column Count = <Number of column it will show>
Datagrid.Column[index].Name = <Name of the column>
Datagrid.Row.Ad d(<Value>)
Comment