This question is locked. New answers and comments are not allowed.
I was using the Trial version of the controls, but now we have purchased the controls and when I installed the product and changed the references for my project I received this error message for the GridView.SelectedChangedEvent
Telerik.Windows.Data.DataRecord is obsolete
The error message didn't offer another solution and from looking at the help documentation, it looks like the DataRecord is still used? Should I be using something else? Here is my code snippet.
Telerik.Windows.Data.DataRecord dataRecord = ((Telerik.Windows.Data.DataRecord)((RadGridView)sender).SelectedRecords[0]);
//Custom Object...ElementDetail
ElementDetail elementDetail = dataRecord.Data as ElementDetail;
int elementNumber = int.Parse(elementDetail.ElementNumber);
loadRadWindow(elementNumber);
thanks
Telerik.Windows.Data.DataRecord is obsolete
The error message didn't offer another solution and from looking at the help documentation, it looks like the DataRecord is still used? Should I be using something else? Here is my code snippet.
Telerik.Windows.Data.DataRecord dataRecord = ((Telerik.Windows.Data.DataRecord)((RadGridView)sender).SelectedRecords[0]);
//Custom Object...ElementDetail
ElementDetail elementDetail = dataRecord.Data as ElementDetail;
int elementNumber = int.Parse(elementDetail.ElementNumber);
loadRadWindow(elementNumber);
thanks
5 Answers, 1 is accepted
0
Hello mark,
As of Q2 2009 we encourage users to use data items instead of records since that is more natural and straightforward technique.
We also have properties called CurrentItem and SelectedItem that will eventually replace CurrentRecord and SelectedRecord.
Hope this helps.
Sincerely yours,
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.
As of Q2 2009 we encourage users to use data items instead of records since that is more natural and straightforward technique.
| // you can use: |
| ElementDetailt elementDetail = ((RadGridView)sender).SelectedItems[0]; |
| int elementNumber = int.Parse(elementDetail.ElementNumber); |
| loadRadWindow(elementNumber); |
| // instead of: |
| Telerik.Windows.Data.DataRecord dataRecord = ((Telerik.Windows.Data.DataRecord)((RadGridView)sender).SelectedRecords[0]); |
| ElementDetail elementDetail = dataRecord.Data as ElementDetail; |
| int elementNumber = int.Parse(elementDetail.ElementNumber); |
| loadRadWindow(elementNumber); |
We also have properties called CurrentItem and SelectedItem that will eventually replace CurrentRecord and SelectedRecord.
Hope this helps.
Sincerely yours,
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
efi
Top achievements
Rank 1
answered on 13 Oct 2009, 12:51 PM
1) What is ElementDetail (need Reference ? Using <namespace> ?)
2) How do i get the SelectedIndex for a RadGridView control ?
Many thanks,
Efi
2) How do i get the SelectedIndex for a RadGridView control ?
Many thanks,
Efi
0
Hello,
ElementDetail is the data object. You can get the index using IndexOf() method of Items property and SelectedItem.
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
ElementDetail is the data object. You can get the index using IndexOf() method of Items property and SelectedItem.
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mathan lal
Top achievements
Rank 1
answered on 17 Dec 2009, 01:22 PM
HI I was using the Trial version of the controls, but now we have purchased the controls and when I installed the latest version of Telerik controls . I received this error message for
DataRecord dataRecord = new DataRecord();
Here is my code snippet.
DataRecord dataRecord = new DataRecord();
dataRecord = (DataItemCollection)RadGridView1.Items[Count - 1];
RadGridView1.SelectedItem = dataRecord.Data;
Thanks,
Madan
0
Hello Mathan,
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
All "records" classes were obsolete for more than 6 months and deleted for the official Q3. You can use Items instead. In your case you should create new instance of your item type and assign this to SelectedItem.
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
