Hello everyone,
I am trying to show the HeaderContextFilterMenu every time an image is clicked in the header of a RadGrid control.
I'm using this example as a reference.
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextfiltermenu/defaultcs.aspx
I am handling the image clicks in jQuery like so...
//images have a class of .showFilter
$(".showFilter").live('click', function (event, handler) {
var mouseEvent = event.originalEvent;
showFilter(this, mouseEvent)
});
...getting the Radrid header object in jQuery and then calling the _initHeaderContextMenu() to show the menu.
function showFilter(imageLink, event)
{
var header = imageLink.parentElement.control;
var sysEvent = new Sys.UI.DomEvent(event);
header._initHeaderContextMenu(sysEvent, undefined, 75, 20);
}
This does show the HeaderContextMenu for the proper column header.
The problem is that the menu immediately closes.
I suspect this is because I am not capturing the same event as a right click on the header but instead manufacturing a Sys.UI.DomEvent based off the image click event.
Can anyone help me out with this?
Thanks,
Chuck
I am trying to show the HeaderContextFilterMenu every time an image is clicked in the header of a RadGrid control.
I'm using this example as a reference.
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextfiltermenu/defaultcs.aspx
I am handling the image clicks in jQuery like so...
//images have a class of .showFilter
$(".showFilter").live('click', function (event, handler) {
var mouseEvent = event.originalEvent;
showFilter(this, mouseEvent)
});
...getting the Radrid header object in jQuery and then calling the _initHeaderContextMenu() to show the menu.
function showFilter(imageLink, event)
{
var header = imageLink.parentElement.control;
var sysEvent = new Sys.UI.DomEvent(event);
header._initHeaderContextMenu(sysEvent, undefined, 75, 20);
}
This does show the HeaderContextMenu for the proper column header.
The problem is that the menu immediately closes.
I suspect this is because I am not capturing the same event as a right click on the header but instead manufacturing a Sys.UI.DomEvent based off the image click event.
Can anyone help me out with this?
Thanks,
Chuck