jQWidgets Forums

jQuery UI Widgets Forums Grid Remove filter/sort options completely

This topic contains 5 replies, has 3 voices, and was last updated by  Peter Stoev 12 years, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • shimmoril
    Participant

    Even when I have sortable/filterable/groupable all set to false for a column, I still see the arrow for filtering/sorting. When the box opens, all the options are greyed out (since they have been turned off) – see screenshot: http://img846.imageshack.us/img846/7997/filteroptions.png

    How can I get rid of this arrow/popup completely, for just the one column?


    Peter Stoev
    Keymaster

    It is possible to turn off the columns menu for all columns only. The columnsmenu property specifies whether the menu is enabled or disabled.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Remove filter/sort options completely #6264

    akansha
    Member

    i have included type as string as mentioned below, but still i am getting option as less than and greater than, may be because the data in the grid is like ‘ra1’, ‘ra2’.

    Please find below the code,

    function GetColumns(jsonObj) {
    var columns = new Array();
    columns.push({
    text: 'Select',
    datafield: 'Select',
    columntype: 'button',
    cellsrenderer: function() {
    return "Select";
    },
    sortable: false,
    filterable: false,
    "width": 70

    });
    for (var i = 0; i < jsonObj.length; i++) {
    //console.log(jsonObj[i].Text[0].Text);
    columns.push({
    "text": jsonObj[i].Text[0].Text,
    "datafield": jsonObj[i].Text[0].Text,
    "value": jsonObj[i].Text[0].Text,
    "width": 220,
    "type": 'string'
    });

    }
    return columns;
    }
    function Getdata(headers, dataRowsValues) {

    // prepare the data
    var data = new Array();
    var datafieldarray = new Array();

    for (var i = 0; i < headers.length; i++) {
    // console.log(headers[i].Text[0].Text);
    datafieldarray.push({
    "name": headers[i].Text[0].Text
    , type: "string"
    });
    }
    for (var i = 0; i < dataRowsValues.length; i++) {
    var row = {};
    for (var j = 0; j < headers.length; j++) {
    //console.log(dataRowsValues[i].string[j].Text);
    row[headers[j].Text[0].Text] = dataRowsValues[i].string[j].Text;
    }
    data[i] = row;
    }
    var source =
    {
    datatype: "array",
    localdata: data
    };
    return source;
    }

    Am i missing something???

    And also i am getting scroll bar in column sorting and filtering menu. How can get rid of that?

    Remove filter/sort options completely #6265

    Peter Stoev
    Keymaster

    Hi akansha,

    There’s no way to disable the columns menu for just a specific column in this version of jQWidgets. It is possible to disable the columns menu for all columns by setting the jqxGrid’s columnsmenu property to false.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Remove filter/sort options completely #6266

    akansha
    Member

    My question is

    1) if i am mentioning the type explicitly as string then also i m getting options foe numeric type like”less than ” , and greater than etc,
    2) I am getting scroll bar in column sorting and filtering menu. How can get rid of that?

    Remove filter/sort options completely #6267

    Peter Stoev
    Keymaster

    Hi akansha,

    – The type should be specified in the definition of the datafields array of the source object. The type can be set to ‘bool’, ‘string’, ‘date’, ‘float’, or ‘number’. Set the type to ‘string’ and you will see the filtering options for strings. That is the behavior in jQWidgets 2.3.
    – I don’t know how to display a scrollbar in the columns menu. I can’t reproduce this on my side. If you are seeing a scrollbar, then please send me a sample as I suppose there could be some inherited CSS setting.

    est Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.