Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display the last page initially in DataGrid, how?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01009344
Message ID:
01009618
Vues:
24
Dawa,
I guess I am not really answering your question, but would reversing the order in your select statement work for your customer? Lets say you order the records by some date field, what about switching the order from acending to decending order.

Why do you specify the datasource twice in your code example? And why do you bind it twice?

Einar

>I've a pageable DataGrid bound to a DefaultView of a Table in a DataSet. Our client would like to see the last page first (which displays the most recent info), then go back to previous pages. For example, if there 5 pages, they will see "Page 5 of 5" first then they can click on the "Previous" link to see the other pages. How can I do that?
>
>I've tried the following in the Page_Load event :
>
>//Code Omitted
>this.myDataGrid.DataSource = this.myDataSet.Tables[0].DefaultView;
>this.myDataGrid.DataBind();
>this.myDataGrid.CurrentPageIndex = this.myDataGrid.PageCount-1;
>this.myDataGrid.DataSource = this.myDataSet.Tables[0].DefaultView;
>this.myDataGrid.DataBind();
>//Code Omitted
>
>
>Which seems to display the last page but then Previous link doesn't work properly, it only pages back couple times and I never see the first page.
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform