6 Answers, 1 is accepted
0
Accepted
Hello, Craig,
In order to detect when a header cell is clicked you can handle the CellClick event and check the row/column passed in the GridViewCellEventArgs:
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
In order to detect when a header cell is clicked you can handle the CellClick event and check the row/column passed in the GridViewCellEventArgs:
public
RadForm1()
{
InitializeComponent();
this
.radGridView1.CellClick += radGridView1_CellClick;
}
private
void
radGridView1_CellClick(
object
sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if
(e.Row ==
this
.radGridView1.MasterView.TableHeaderRow && e.ColumnIndex > -1)
{
Console.WriteLine(
"Header cell is clicked"
);
}
}
I hope this information helps. If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0
Craig
Top achievements
Rank 1
answered on 03 May 2018, 03:24 PM
Thank you!
0
Thomas
Top achievements
Rank 1
answered on 08 Oct 2019, 07:15 PM
I'm attempting to use this same approach to capture a click on a RadGridView column header but the CellClick event is not found. Could it be that I'm using an earlier version of Telerik (2017.3.913.45)?
Thanks.
0
Hello, Thomas,
The RadGridView.CellClick event is available in the specified version as well. That is why I have attached my sample project for your reference. Could you please give it a try and see how it works?
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
The RadGridView.CellClick event is available in the specified version as well. That is why I have attached my sample project for your reference. Could you please give it a try and see how it works?
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
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.
0
Thomas
Top achievements
Rank 1
answered on 09 Oct 2019, 02:21 PM
Thank you for your quick response. I just realized that this the Win Forms forum rather than the WPF forum. I'm attempting to do this using WPF. Sorry about the confusion. I am going to re post this in the WPF forum.
Thanks.
0
Hello, Thomas,
Yes, indeed, this forum is related to the Telerik UI for WinForms suite. If you have any questions regarding other products, feel free to post them in the relevant forum and thus the respective community will gladly assist you: https://www.telerik.com/forums
Thank you for your understanding.
Regards,
Dess | Tech Support Engineer, Sr.
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.