Click here to Skip to main content
15,910,234 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: hiii urgent Pin
ishwarya mahadevan17-Mar-10 0:16
ishwarya mahadevan17-Mar-10 0:16 
GeneralRe: Storing Session Information in Table From web service Pin
Abhijit Jana17-Mar-10 0:26
professionalAbhijit Jana17-Mar-10 0:26 
AnswerRe: hiii urgent Pin
saanj18-Mar-10 23:43
saanj18-Mar-10 23:43 
Questionhello Pin
Mr.Sandeep Chaudhary16-Mar-10 22:46
Mr.Sandeep Chaudhary16-Mar-10 22:46 
AnswerRe: hello Pin
Abhijit Jana16-Mar-10 22:53
professionalAbhijit Jana16-Mar-10 22:53 
AnswerRe: hello Pin
Steven J Jowett17-Mar-10 0:32
Steven J Jowett17-Mar-10 0:32 
GeneralRe: hello Pin
Keith Barrow17-Mar-10 6:50
professionalKeith Barrow17-Mar-10 6:50 
Questionreg directive Pin
sowjanya316-Mar-10 22:15
sowjanya316-Mar-10 22:15 
AnswerRe: reg directive Pin
Abhijit Jana16-Mar-10 22:34
professionalAbhijit Jana16-Mar-10 22:34 
GeneralRe: reg directive Pin
sowjanya317-Mar-10 0:50
sowjanya317-Mar-10 0:50 
QuestionDetailsview - Primary Key - Autogenerate Pin
rikhav16-Mar-10 21:30
rikhav16-Mar-10 21:30 
Question.net webservices tracking usps and ups Pin
laziale16-Mar-10 10:50
laziale16-Mar-10 10:50 
AnswerRe: .net webservices tracking usps and ups Pin
T M Gray16-Mar-10 11:13
T M Gray16-Mar-10 11:13 
GeneralRe: .net webservices tracking usps and ups Pin
laziale16-Mar-10 11:16
laziale16-Mar-10 11:16 
QuestionReturn Value from Stored Procedure Pin
ahayw0116-Mar-10 8:06
ahayw0116-Mar-10 8:06 
AnswerRe: Return Value from Stored Procedure Pin
Sandeep Mewara16-Mar-10 9:14
mveSandeep Mewara16-Mar-10 9:14 
GeneralRe: Return Value from Stored Procedure Pin
ahayw0116-Mar-10 9:23
ahayw0116-Mar-10 9:23 
GeneralRe: Return Value from Stored Procedure Pin
Sandeep Mewara16-Mar-10 9:27
mveSandeep Mewara16-Mar-10 9:27 
GeneralRe: Return Value from Stored Procedure Pin
Sandeep Mewara16-Mar-10 9:34
mveSandeep Mewara16-Mar-10 9:34 
GeneralRe: Return Value from Stored Procedure Pin
ahayw0116-Mar-10 9:34
ahayw0116-Mar-10 9:34 
GeneralRe: Return Value from Stored Procedure Pin
Sandeep Mewara16-Mar-10 9:38
mveSandeep Mewara16-Mar-10 9:38 
QuestionDefaulting a DataView control with paging to the last page. Pin
Steven J Jowett16-Mar-10 7:00
Steven J Jowett16-Mar-10 7:00 
I have DataView control with paging on an asp.net webpage. I have been asked if it is possible to default the DataView to the last page, rather than page 1.

So I tried this :-

Protected Sub telemetryGridView_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles telemetryGridView.PreRender
        If Not IsPostBack Then
            telemetryGridView.PageIndex = telemetryGridView.PageCount - 1
            telemetryGridView.DataBind()
        End If
    End Sub


I read somewhere that after setting the PageIndex I would need to call the DataBind method of the GridView.

The result is that the GridView still defaults to page 1.

Can anyone enlighten me as to where I am going wrong?

Thanks
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.

AnswerRe: Defaulting a DataView control with paging to the last page. Pin
Sandeep Mewara16-Mar-10 7:15
mveSandeep Mewara16-Mar-10 7:15 
AnswerRe: Defaulting a DataView control with paging to the last page. Pin
ASHISH GHADI18-Mar-10 22:02
ASHISH GHADI18-Mar-10 22:02 
AnswerRe: Defaulting a DataView control with paging to the last page. Pin
ASHISH GHADI18-Mar-10 22:08
ASHISH GHADI18-Mar-10 22:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.