12-01-2009 by Marek Śliwiński
Post moved to new location:
http://code.mareoblo.pl/2009/01/12/c-winforms-%e2%80%93-how-to-use-datatable-as-datagridview-datasource-and-datatable-column-with-headertext-property/
Posted in C#, WinForms | Tagged C# Snippets, WinForms | 4 Comments
Great……………………………………!!!!!
Cool–any idea how to get all the data OUT of the gridview and back INTO a datatable? I’ve been playing with lots of loops, but believe there HAS to be an easier way …
Thx for the comment :) You can try this: DateTable tbl = Gridview1.DataSource as DataTable;
DateTable tbl = Gridview1.DataSource as DataTable;
Thank you for the solution, I have been searching for a while on how to convert datagridview to data table.
Thanks a lot :d
Comments RSS
Name (required)
E-mail (will not be published) (required)
Website
Notify me of follow-up comments via email.
Great……………………………………!!!!!
Cool–any idea how to get all the data OUT of the gridview and back INTO a datatable? I’ve been playing with lots of loops, but believe there HAS to be an easier way …
Thx for the comment :) You can try this:
DateTable tbl = Gridview1.DataSource as DataTable;Thank you for the solution, I have been searching for a while on how to convert datagridview to data table.
Thanks a lot :d