Hi,
No , no really the DataSource is of type Object , IIRC therefore you have
to cast it.
It should be wrapped in a try/catch as it may rise exception.
In general it's a bad practice do this kind of construction, it's better if
you keep a reference to the original datasource.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Mark" <ma*******@n0Sp 8mTAIRAWHITIdot AC.NZ> wrote in message
news:bB******** ************@ne ws.xtra.co.nz.. .
H all, I did this;
DataSet oDs = (DataSet)dataGr id1.DataSource;
it seems a little suspect to have to do a manual cast, there must be a
better way surely?
"Mark" <ma*******@n0Sp 8mTAIRAWHITIdot AC.NZ> wrote in message
news:6u******** ************@ne ws.xtra.co.nz.. . Hi, does anyone know how I can simply get the dataset that is bound to a
DataGrid?
Something like...
DataSet dsDataSet = DataGrid1.Table s[0]...........
Thanks
Mark