Need GridView Help Paging

  • Thread starter Thread starter ABHIJIT B
  • Start date Start date
A

ABHIJIT B

Hi,

I am using 2 web pages parent and popup.PopUp window is opened using
window.showModalDialog().This is client requiremnt they don't wnat
window.open()

In PopUp page I am using GridView and DataGrid and want to do Paging.

Also I am using following code in parent form for Paging.Paging is
possible if GridView or Datagrid AutoPost propery is set to true else
I have to go for custom paging.

I am using below code in parent page,I want to use same code in popup
window .
Is it possible ? If not please let me know other alternative.

Kindly help me in following.

Thanks in advance.
---------------------------------------------------------------------------------------------------------
Code:

Session["ServiceDatabaseList"] = ds.Tables[0].DefaultView;

protected void gvServiceDatabaseList_PageIndexChanging(object sender,
GridViewPageEventArgs e)
{
try
{
if (Session["ServiceDatabaseList"] != null)
{
dvDatabaseList =
(DataView)Session["ServiceDatabaseList"];
gvServiceDatabaseList.PageIndex = e.NewPageIndex;
gvServiceDatabaseList.DataSource = dvDatabaseList;
gvServiceDatabaseList.DataBind();
}
}
catch (Exception ex)
{
TraceDBLError.Log("Exception occurred : " + ex.Message);
return;
}
}



Regards,
Abhijit B
 
You could try getting the page name using Page.GetType().Name and on page
load check the page name and set paging to true or false depending on if it's
the name of your popup page or your main page.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
 
Back
Top