Hello, I am trying to convert my existing C# program from the real Microsoft WPF components to the Telerik components. Now I have the problem that I use the function DataGrid.Items.GetItemAt with the Microsoft components. What is the equivalent in Telerik RadGridView?
Thank you in advance
1 Answer, 1 is accepted
0
Accepted
Ivan Ivanov
Telerik team
answered on 14 Jun 2019, 01:44 PM
Hi Noah,
The closest equivalent should be RadGridView.Items[index]. DataitemCollection has the following indexer that operates with the internal collection view, polling the items from it:
public object this[int index]
{
get
{
if (!this.EnsureCollectionView())
throw new InvalidOperationException("No collection");
if (!this.IsLoading)
{
if (index >= 0 && index < this.CollectionView.Count)
{
return this.CollectionView.GetItemAt(index);
}
}
return null;
}
set
{
this.EnsureIsUsingInternalView();
this.InternalView[index] = value;
}
}
Regards,
Ivan Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.