471,873 Members | 1,993 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,873 software developers and data experts.

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 4299
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 zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.