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

RadDataPager UI bug on PageIndexChanging cancel

2 Answers 97 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Jul 2010, 07:43 PM
Hi,

I'm using SilverLight 4.0 with a RadDataPager bound to a RadDataGrid to display and edit some data. When the user edits data and then tries to move to a different page without saving, I've got an event handler for the PageIndexChanging event of the pager displaying a modal dialog with yes/no/cancel options appearing. If the user selects cancel, I simply set the eventargs' cancel property to true. This works fine, and the page does not change, but on the UI it will show the new page is selected, even though it is not.

For example, if the user is on page one, edits the data, clicks page two, selects cancel, then the control remains on page one (and the data is never changed, nor are the unsaved changes lost) but the pager elements on the UI show page two as selected.

Are there any fixes or workarounds for this issue? Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 07 Jul 2010, 01:39 PM
Hi Mike,

To my regret we discovered this problem recently and could not manage to fix it for the official Q2 version scheduled for the beginning of the next week. We will try to fix it for one of the internal builds after the release or for the SP1.

As a workaround you can try to set again the Source property of the dataPager in case you have canceled the event:

private void dataPager_PageIndexChanging(object sender, Telerik.Windows.Controls.PageIndexChangingEventArgs e)
{  
   if (should_cancel_the_event)
   {       
    e.Cancel = true;
    dataPager.Source = Person.GetPeople();
   }
}


Sincerely yours,
Veskoni
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mike
Top achievements
Rank 1
answered on 08 Jul 2010, 04:08 PM
Hi Veskoni,

Thanks for your reply. Setting my data pager's source to null then immediately rebinding it worked around the bug quite neatly.
Tags
DataPager
Asked by
Mike
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Mike
Top achievements
Rank 1
Share this question
or