I have a telerik MVC Grid that is group by Shipping Priority. When the column is drag onto the grouping area, it is grouping and sorting ascending. I'd like to switch it so that it is sorting descending. I tried to using the jQuery function below to click on the button, but it is not fire. What am I missing here?

$(function () {
        var item = $("#Shipping tbody > .t-grouping-header > .t-grouping-indicator");
          alert(item) //Says that is an object. I also made sure that it has a click property by iterating through item
          $(item).click(function() {
            alert('you click me');
            item.click();
        });
    });
    });

Updated on 02/07/2014 @12:42 PM

Here is the link where I describe the grid that I am using.

Thanks in advance for your help.

有帮助吗?

解决方案

I find that using

$(item).trigger("click");

Works rather well for me. It also calls one less function than .click()

其他提示

Try to change:

item.click();

to:

$(item).click();

Btw, you've redundant closing }); in your code as well.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top