469,350 Members | 1,757 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,350 developers. It's quick & easy.

Problem with "Custom paging" of DataGrid control

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.
Jul 19 '05 #1
1 4222
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.
-----Original Message-----
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

ifyou 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.
.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Tinus | last post: by
4 posts views Thread by Steve | last post: by
2 posts views Thread by ahmed.maryam | last post: by
3 posts views Thread by Tomasz J | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.