Hi Filippo,
The grid is intended to work as a view of a data backend ( like a dataset )
it's not intended as a datasource , it's possible to take a grid and build a
data collection with it, basically a collection or records ( you can view
this as a array or a table), you could create a dataset with a table that
contain the same number of columns that cells has a grid's row.
Now this is extremely cumbersome and error prone, if what you have on the
grid is a listing of a folder's file then you should have previously bind
this grid with this data, using somethinig like Directory.GetFiles( )
If it's so then you could keep this array on session and in the postback
just get it back:
string[] FileArray;
if ( !IsPostBack )
{
FileArray = Directory.GetFiles( Request.PhysicalApplicationPath )
Session["FileArray"] = FileArray;
}
else
{
FileArray = string[] Session["FileArray"];
}
Hope this help,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Filippo Pandiani said:
I have a grid that shows the file list from a folder.
On the postback, how do I get a Dataset from this grid?
Thanks,
Filippo.