This is a migrated thread and some comments may be shown as answers.

[Solved] Datagrid Drag Drop (paging problem)

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nick
Top achievements
Rank 1
nick asked on 21 May 2009, 07:44 AM
Hey Telerikians!

I have a problem with the datagrid.  I am building a schedule for students to choose their timetables.

There are two grids in the 'choose your subjects' section.
    One is a grid with two columns:  Start Time  and  End Time.
    The second is a grid with subjects.

These grids have pages set to 10 rows per page.

What my problem is: 

I only want one grids page numbers to come up, as both grids have identical amount of rows.
So when the user clicks a page number on the first grid, the second grid changes to that page too.

currently i have this code which doesn't work:

 

Sub Grid_Change(ByVal source As Object, ByVal e As Telerik.WebControls.GridPageChangedEventArgs)

 

 

'change the page index in both top grids if GridTime index is changed:

 

GridSubjects.CurrentPageIndex() = GridTime.CurrentPageIndex()

GridSubjectsData.Copy()

GridSubjects.Rebind()

 

End Sub

 



Any help will be very appreciated and thankyou in advance,

Nick.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 25 May 2009, 04:10 PM
Hello Nick,

Thank you for contacting us.

To achieve your goal you need to set AllowCustomPaging to "true" and set the VirtualCountItem property to the actual count of the provided data. Hence in the PageIndexChanged event handler you should set he CurrentPageIndex property to the e.NewPageIndex value and re-bind the grid. For further information how to turn on the custom paging please refer to this online help article.

Regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
nick
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or