D
Doug Holland
Hi Ther
I have a DataGrid on a webform which is causing an HttpException in the following code when it transitions from showing all of the packages in the system (12 on two pages) to only linked packages (3 on one page)
m_DataGrid.DataSource = _list; // _list is an ArrayList instanc
if(m_DataGrid.CurrentPageIndex > m_DataGrid.PageCount
m_DataGrid.CurrentPageIndex = 0
m_DataGrid.DataBind()
The if statement never evaluates to true and as such the CurrentPageIndex is not reset to zero at this point and therefore an appropriate value for CurrentPageIndex exists just prior to the call to m_DataGrid.DataBind(), within that method call though the CurrentPageIndex becomes invalid and the HttpException is thrown
How do I handle this situation
Thanks in advanc
Doug Holland
I have a DataGrid on a webform which is causing an HttpException in the following code when it transitions from showing all of the packages in the system (12 on two pages) to only linked packages (3 on one page)
m_DataGrid.DataSource = _list; // _list is an ArrayList instanc
if(m_DataGrid.CurrentPageIndex > m_DataGrid.PageCount
m_DataGrid.CurrentPageIndex = 0
m_DataGrid.DataBind()
The if statement never evaluates to true and as such the CurrentPageIndex is not reset to zero at this point and therefore an appropriate value for CurrentPageIndex exists just prior to the call to m_DataGrid.DataBind(), within that method call though the CurrentPageIndex becomes invalid and the HttpException is thrown
How do I handle this situation
Thanks in advanc
Doug Holland