Unplanned
Last Updated: 31 Oct 2019 11:52 by ADMIN
CaseNet
Created on: 30 Oct 2019 11:32
Category: Grid
Type: Bug Report
1
When clicking below the Menu icon in RadGrid Mobile RenderMode causes the Column to be sorted

Assuming the following configuration for RadGrid:

  • RenderMode="Mobile"
  • AllowSorting="true"

Testing using a mobile device (e.g. Chrome in Galaxy Nexus)

Test case 1:

If I click on middle of three dots Icon, then RadGrid opens the options menu

Test case 2:

If I click a bit below of the three dots Icon, then RadGrid does a sort on the column automatically

1 comment
ADMIN
Attila Antal
Posted on: 30 Oct 2019 11:41

Thank you for your time reporting this issue!

After doing some investigation on this case, we found that the event duplicates and they both do something. One opens the Menu view followed by the second which will fire the sort command on the column.

The following JavaScript code overrides the original internal logic to avoid this problem. This could be a viable workaround until the issue is fixed in the source code:

Telerik.Web.UI.GridMobileColumnView.prototype.onInit = function () {
    var that = this;

    // override addition START
    if (navigator.maxTouchPoints == 0) {
        this.get_$element()
            .on("click", $.proxy(that._click, that))
    }
    // override addition END

    this._$groupOption = this.get_$element()
        // .on("click", $.proxy(that._click, that)) // original line commented out
        .find(".rgButtonGroup");

    this.get_$element().gestures({
        tap: $.proxy(that._click, that),
        alwaysPreventDefault: false
    });
}