Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Need GridView Help Paging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ABHIJIT B - 06 Feb 2008 22:38 GMT
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
Phil Johnson - 07 Feb 2008 08:51 GMT
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.

Signature

Regards,

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

> Hi,
>
[quoted text clipped - 43 lines]
> Regards,
> Abhijit B

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.