7 Answers, 1 is accepted
Generally there is no exposed event to which you can subscribe that would fit the requirements. However you can attach a mousedown handler to the grid and check if a header is click using the following code.
ASPX:
<
telerik:RadGrid
ID
=
"RadGrid1"
onmousedown
=
"onGridMouseDown(this,event);"
>
</
telerik:RadGrid
>
JavaScript:
function
onGridMouseDown(s, e) {
if
(e.target.className.indexOf(
"rgHeader"
) !== -1) {
//header was clicked
}
}
Regards,
Angel Petrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I also do not see an OnMouseDown event under RadGrid ClientEvents
The illustrated behavior is expected. The grid does not have an OnMouseDown client event exposed. If you examine the code provided in my previous post you will notice that the handler is attached directly in the markup(an approach also illustrated here). Considering the aforementioned I recommend applying the same principle to the real application and testing it again.
Regards,
Angel Petrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
If (e.locaction < RadGridView1.GridViewElement.TitleLabelElement.Size.Height)
'perform action(s);Hello,
I am also posting the reply here so it could be helpful to other developers as well:
The proper way to achieve this requirement is to use the built-in event handlers and the API of the grid - OnUserAction or OnCommand:
https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/events/onuseraction
Hope this helps.
Regards,
Eyup
Progress Telerik