Shweta Patole
Top achievements
Rank 1
Shweta Patole
asked on 14 Jul 2009, 03:00 PM
Hi,
This is really urgent.
I want to maintain the selection of the item of carousal after its rebound or refreshed.
PLease find the code below which is not working;
This is really urgent.
I want to maintain the selection of the item of carousal after its rebound or refreshed.
PLease find the code below which is not working;
int
iSelIndex = rdcTasks.Records.IndexOf(rdcTasks.SelectedRecord);
this.rdcTasks.ItemSource = list;
RadCarouselPanel
panel = this.rdcTasks.FindCarouselPanel();
panel.BringDataItemIntoView(rdcTasks.Records[iSelIndex]);
this.rdcTasks.Records[iSelIndex].IsSelected = true;
I have tried other properties like currentItem & Currentrecord but no gain.
REgards,
S
4 Answers, 1 is accepted
0
Hi Shweta Patole,
You can try the following:
Hope this works.
Greetings,
Milan
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.
You can try the following:
var selectedIndex = this.RadCarousel1.Records.IndexOf(this.RadCarousel1.SelectedRecord); |
this.RadCarousel1.SelectedRecord = null; |
this.RadCarousel1.ItemsSource = myNewSource |
this.Dispatcher.BeginInvoke(new Action(() => |
{ |
this.RadCarousel1.SelectedRecord = this.RadCarousel1.Records[selectedIndex]; |
}), System.Windows.Threading.DispatcherPriority.SystemIdle, null); |
Hope this works.
Greetings,
Milan
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.
0
Shweta Patole
Top achievements
Rank 1
answered on 15 Jul 2009, 08:31 AM
Hi
Thanks for your prompt reply.
I have tried the same thing, but there is a movement in te control. it moves to the first record and then moves back to the selected one. Is there any way to stop this so that user wouldnt know whats happening?
Regards,
Shweta
Thanks for your prompt reply.
I have tried the same thing, but there is a movement in te control. it moves to the first record and then moves back to the selected one. Is there any way to stop this so that user wouldnt know whats happening?
Regards,
Shweta
0
Hi Shweta Patole,
You could try setting the animation duration to zero and hiding the panel before the animation and after that restore the visibily and the duration. That might improve the experience but still there will be a single flicker. Here is a sample code:
We will try to provide a better support for such scenarios in the future.
Greetings,
Milan
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.
You could try setting the animation duration to zero and hiding the panel before the animation and after that restore the visibily and the duration. That might improve the experience but still there will be a single flicker. Here is a sample code:
public void Rebind() |
{ |
var panel = this.RadCarousel1.FindCarouselPanel(); |
var duration = panel.ItemsMovementAnimationDuration; |
panel.ItemsMovementAnimationDuration = TimeSpan.Zero; |
var selectedIndex = this.RadCarousel1.Records.IndexOf(this.RadCarousel1.SelectedRecord); |
this.RadCarousel1.SelectedRecord = null; |
this.RadCarousel1.ItemsSource = null; |
this.RadCarousel1.ItemsSource = data; |
panel.Visibility = Visibility.Hidden; |
this.Dispatcher.BeginInvoke(new Action(() => |
{ |
this.RadCarousel1.SelectedRecord = this.RadCarousel1.Records[selectedIndex]; |
}), System.Windows.Threading.DispatcherPriority.SystemIdle, null); |
this.Dispatcher.BeginInvoke(new Action(() => |
{ |
panel.Visibility = Visibility.Visible; |
panel.ItemsMovementAnimationDuration = duration; |
}), System.Windows.Threading.DispatcherPriority.SystemIdle, null); |
} |
We will try to provide a better support for such scenarios in the future.
Greetings,
Milan
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.
0
sridhar
Top achievements
Rank 1
answered on 29 Jun 2011, 01:27 PM
Hello,
I have been using the rad carousal in a wpf application. I am unable to maintain the selected item of previous session, i.e when i select an item , then close the appln and then open i am not seeing the selected item.
please help me.
Thanks
Sridhar
I have been using the rad carousal in a wpf application. I am unable to maintain the selected item of previous session, i.e when i select an item , then close the appln and then open i am not seeing the selected item.
please help me.
Thanks
Sridhar