Create datable/dataview from datagrid

F

fabrice

hi,

i have populated and bind a datgrid conrol with a dataset.
is it possible to recreate a datable which will be populated with data from
the datagrid.


I m trying this solution,


Dim mytable As DataTable = CType(MyDataGrid.DataSource, DataTable).
But it seems no working.

If I want to count rows, for example, with this function mytable .Rows.Count
, i get an error.


thanks for you help.
fabrice
 
G

Guest

If it’s post back, you can’t get datagrid’s data source, unless you re-bind
the datagrid.

HTH


Elton Wang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top