on 01-21-2008 10:56 AM
Hi all,
I filled a datatable with a query.
Now i want to insert a row in the datatable but not at the end.
How can i do that?
Thanks.
Hi Julien,
You can add a empty row to a datatable using
objDatatable.Rows.Add()
If you want to fill the data then you have to access that row with index and then fill the data
you can get the index of last added row like this (objDatatable.Rows.Count-1) as datatable row index starts with zero
Hope it helps you
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe the method DataRows.Add has one parameter that is used for this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.