I have RadGridView, and I need to get Header cell for all columns. How to get header cells (not content) in RadGridView.
Thanks.
1 Answer, 1 is accepted
0
Dinko | Tech Support Engineer
Telerik team
answered on 14 Feb 2018, 02:00 PM
Hi Mikhail,
To get all the column headers you can first subscribe to the Loaded event of your RadGridView. Then using ChildrenOfType<T>() extension method you can get all GridViewHeaderCell. Keep in mind that you need to use Dispatcher. Check the following code snippet.
foreach (var headerCell in this.myGrid.ChildrenOfType<GridViewHeaderCell>())
{
// your code
}
}
Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.