Need GridView Help Paging

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
 
P

Phil Johnson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top