[RESOLVED] Adding rows to datagridview programatically
Hi all,
Could someone tell me how to add rows to a datagridview programatically. This datagridview is already bounded to a table containing one row present in the SQL server (i.e the database), Now i want to add rows dynamically when it satisfies some condition..
Please help......
Re: Adding rows to datagridview programatically
how are you binding? If you are using a DataTable, then simply add additional rows to the DataTable.
Re: Adding rows to datagridview programatically
You can get the datasource its bounded to, get its datatable, add new rows and refresh. Do you want an example? Let me know.
Regards,
CT.
Check out www.cuteassistant.com - Manage your tasks, take notes, securely store data and more!
Re: Adding rows to datagridview programatically
Hi,
I created a datarow, and added it to the respective dataset.......it works fine :)
Re: Adding rows to datagridview programatically
Quote:
Originally Posted by
daffodils180
Hi,
I created a datarow, and added it to the respective dataset.......it works fine :)
Great. Its easier as well. Can you please mark it as Resolved ? :)