Adding New Row in Datagridview
-
Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?
priya
-
Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?
priya
I think in the grid property's you can select whether a new row is inserted at the top or bottom. I don't use WinForms very often though so I'm not sure.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
-
Hi Everyone, i m developing application using vb.net (Winforms). i wnt to add row at bottom (after my existing rows) , in my datagridview when user clicks on edit button. i wrote following code on my edit button after adding all records from my database. dgvTaskList.Rows.Add() but it is adding row at top of all rows & i wnt it at bottom. will anyone tell me wht shuld i do?
priya
you can do some things like "Me.DataGridView1.Rows.Insert(..." or check sorting options of your binding source/your datagrid.