Вопрос

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