P
pittster
Hi,
I've bound a Gridview control to the GetFiles method
Here is a code snippet:
DirectoryInfo objDi = new
DirectoryInfo(Server.MapPath("./somepath"));
FileInfo[] arrFileInfo = objDi.GetFiles();
GridView2.DataSource = arrFileInfo;
GridView2.DataBind();
The GridView has 1 defined BoundField - "Name"
I've enabled pageing, but when I click on a page number I get the
following message:
The GridView 'GridView2' fired event PageIndexChanging which wasn't
handled
I understand that I need to handle the event.
However I don't know how to increment the index of the datasource to
the appropriate index to show the next page's values (ie Show the next
10 values)
Any help would be appreciated. Please show example code if you have
any.
Thanks.
I've bound a Gridview control to the GetFiles method
Here is a code snippet:
DirectoryInfo objDi = new
DirectoryInfo(Server.MapPath("./somepath"));
FileInfo[] arrFileInfo = objDi.GetFiles();
GridView2.DataSource = arrFileInfo;
GridView2.DataBind();
The GridView has 1 defined BoundField - "Name"
I've enabled pageing, but when I click on a page number I get the
following message:
The GridView 'GridView2' fired event PageIndexChanging which wasn't
handled
I understand that I need to handle the event.
However I don't know how to increment the index of the datasource to
the appropriate index to show the next page's values (ie Show the next
10 values)
Any help would be appreciated. Please show example code if you have
any.
Thanks.