Problem with "Custom paging" of DataGrid control

A

Alex

I created a page to show RealEstate Data with images
retrived from the MSSQL 2000. I am using a DataGrid
control:

<asp:datagrid
AllowPaging="True"
OnPageIndexChanged="Pageindexchanged"
Sub PageIndexChanged(ByVal sende.........)
myDataGrid.CurrentPageIndex = e.NewPageIndex
myDataGrid.DataBind()
End Sub

It works just fine and I am able to go thru the records.
The problem begins when I trying to implement Custom
paging which is a very important for large number of
records and aspetially in my case with a images,becouse if
you using a Custom paging the page is receiving only
current record baced od page index.
So, when I am chenging my code to:

<asp:datagrid
AllowPaging="True"
AllowCustomPaging="True"
OnPageIndexChanged="Pageindexchanged"
Sub PageIndexChanged(ByVal sende.........)
intStartIndex = (e.NewPageIndex * myDataGrid.PageSize)
myDataGrid.CurrentPageIndex = e.NewPageIndex
BindDataGrid()
End Sub

the event OnPageIndexChanged become not available! I have
no idea what is happened. I got the same sittuation with
Sorting event.
I will be appretiate for any help.
Alex.
 
A

Alex

Figured it out,thanks!
I had an error in Form load event,this is why the next
event was not show up.I just do not understant why I did
not get any error msg.
Alex.
 

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

Similar Threads


Members online

Forum statistics

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

Latest Threads

Top