Get DataGrids DataSource

V

Vishal

Does anybody know how I can get the datasource of a
datagrid? FOr example, If I bind a ds to a datagrid, then
I would like to get the ds back somehow. Is that possible,
if so how?

Thanks
 
E

Elton Wang

If you know it's DataSet, you can

DataSet ds = (DataSet)datagrid.DataSource;

Hope it's helpful.

Elton Wang
(e-mail address removed)
 
V

VIshal

Already tried and it doesnt work. I am 100% sure that it
is a ds. I used the debugger and saw that the datsource is
nothing. How can that be? I am using denis bauers datagrid
and this is happening in the nested datagrid, which is a
normal datagrid. Can somebody help?
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top