This question is locked. New answers and comments are not allowed.
Jingying Wu
Top achievements
Rank 1
Jingying Wu
asked on 08 Jul 2009, 05:47 PM
We would like to hook the keyboard up/down arrow to update a usercontrol with the CurrentItem's data.
How do i go about doing this?
Currently i am using cell.MouseLeftButtonUp, i want to add the keyboard up/down event too.
thanks.
How do i go about doing this?
Currently i am using cell.MouseLeftButtonUp, i want to add the keyboard up/down event too.
thanks.
5 Answers, 1 is accepted
0
Hi Jingying Wu,
It will be much more easier if you handle PropertyChanged for CurrentItem similar to this demo:
http://demos.telerik.com/silverlight/#GridView/DataSourceUpdates
Sincerely yours,
Vlad
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.
It will be much more easier if you handle PropertyChanged for CurrentItem similar to this demo:
http://demos.telerik.com/silverlight/#GridView/DataSourceUpdates
Sincerely yours,
Vlad
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
Jingying Wu
Top achievements
Rank 1
answered on 09 Jul 2009, 05:08 PM
That works. thanks again
0
Jingying Wu
Top achievements
Rank 1
answered on 11 Jul 2009, 01:12 AM
There's an issue with using PropertyChanged event.
I have a Delete button on the Grid.
When i click on the delete button. It fires the DeleteButton_Click and also PropertyChanged event.
How can i prevent the PropertyChange event from firing when i click delete?
thanks again
jy
I have a Delete button on the Grid.
When i click on the delete button. It fires the DeleteButton_Click and also PropertyChanged event.
How can i prevent the PropertyChange event from firing when i click delete?
thanks again
jy
0
Jingying Wu
Top achievements
Rank 1
answered on 11 Jul 2009, 01:24 AM
Another issue is when i click on a row, it fires the PropertyChanged Event multiple times.
jy
jy
0
Hi Jingying Wu,
Well, when you delete an item the current item is changed and naturally the property changed event is fired and currently there is no way to prevent that from happening.
We are investigating the issue with PropertyChanged firing multiple times and we will fix it as soon as possible. Meanwhile you could try something like that:
Now you code will be executed only once no matter if the event is fired multiple times.
Hope this works.
Thank you for your feedback - I have updated your Telerik points.
Kind regards,
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.
Well, when you delete an item the current item is changed and naturally the property changed event is fired and currently there is no way to prevent that from happening.
We are investigating the issue with PropertyChanged firing multiple times and we will fix it as soon as possible. Meanwhile you could try something like that:
| private object lastCurrent; |
| private void RadGridView_PropertyChanged(object sender, PropertyChangedEventArgs e) |
| { |
| if (e.PropertyName == "CurrentItem" && lastCurrent != this.RadGridView1.CurrentItem) |
| { |
| lastCurrent = this.RadGridView1.CurrentItem |
| // execute logic |
| } |
| } |
Now you code will be executed only once no matter if the event is fired multiple times.
Hope this works.
Thank you for your feedback - I have updated your Telerik points.
Kind regards,
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.
