Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem with "Custom paging" of DataGrid control

Reply
Thread Tools

Problem with "Custom paging" of DataGrid control

 
 
Alex
Guest
Posts: n/a
 
      09-14-2003
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.


 
Reply With Quote
 
 
 
 
Alex
Guest
Posts: n/a
 
      09-14-2003
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

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we use dropdownlist control in Datagrid control? Bhuwan Bhaskar ASP .Net 2 10-04-2007 06:09 PM
DataGrid edited values problem and autogenerated columns in DataGrid problem John Walsch ASP .Net Web Controls 0 07-09-2004 03:03 PM
Composite Control not receiving DataGrid (child control) events? debartsa ASP .Net Building Controls 0 04-19-2004 08:12 PM
Control derived from datagrid, problem with adding other control and databinding (VB) Jc Morin ASP .Net Building Controls 1 12-05-2003 07:22 PM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments