jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 40 total)
  • Author
    Posts

  • nikitaso
    Participant

    What I mean is that I want to add indicator that column is sorted, data comes back from server already presorted.

    in reply to: Clear grid filter Clear grid filter #46310

    nikitaso
    Participant

    So there is no way to clear one filter and leave others active?

    in reply to: Clear grid filter Clear grid filter #46300

    nikitaso
    Participant

    I basically need to remove only one filter, lets say I applied 2 filters and I want to remove one of them using api.

    http://bondsdemo.trademorebonds.com/grid-filter.html

    Enter ‘an’ to ‘name’ col and 5 into ‘qty’ column, then ‘remove filter’. it removes ‘name’ filter and clears value from ‘qty’

    http://localhost:1677/grid-filterrefresh.html << with ‘refresh’

    in reply to: Clear grid filter Clear grid filter #46295

    nikitaso
    Participant

    ‘refreshfilterrow’ not working.

    in reply to: Clear grid filter Clear grid filter #46293

    nikitaso
    Participant

    Here taken from filter sample:

        <script type="text/javascript">
            $(document).ready(function () {
                var theme = getDemoTheme();
    
                var data = generatedata(500);
                var source =
                {
                    localdata: data,
                    datafields:
                    [
                        { name: 'name', type: 'string' },
                        { name: 'productname', type: 'string' },
                        { name: 'available', type: 'bool' },
                        { name: 'date', type: 'date' },
                        { name: 'quantity', type: 'number' }
                    ],
                    datatype: "array"
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source);
    
                $("#jqxgrid").jqxGrid(
                {
                    width: 685,
                    source: dataAdapter,
                    showfilterrow: true,
                    filterable: true,
                    theme: theme,
                    selectionmode: 'multiplecellsextended',
                    columns: [
                      { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', datafield: 'name', width: 115 },
                      {
                          text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220
                      },
                      { text: 'Available', datafield: 'available', columntype: 'checkbox', filtertype: 'bool', width: 67 },
                      { text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd' },
                      { text: 'Qty.', datafield: 'quantity', filtertype: 'number', cellsalign: 'right' }
                    ]
                });
                $('#clearfilteringbutton').jqxButton({ height: 25, theme: theme });
                $('#clearfilteringbutton').click(function () {
                    $('#jqxgrid').jqxGrid('removefilter', "name", true);
                   
                });
            });
        </script>
    
    in reply to: Filter option Filter option #32496

    nikitaso
    Participant

    Ok.. unfortunately doing that mouse over on filter icon is complicated for user base 🙂

    Thank you for reply.
    Nikita.

    in reply to: Filter option Filter option #31480

    nikitaso
    Participant

    basically i want similar filter condition selection like there is for numeric fields. for some reason for text there is no dropdown.

    in reply to: Grid Date format for filter Grid Date format for filter #25801

    nikitaso
    Participant

    hmm

    what is the difference between formatData and processData?

    I actually used processData to append more data to whats being send to server.


    nikitaso
    Participant

    So is it a bug?


    nikitaso
    Participant

    Nevermind comment about “virtualmode”.

    Seems like your sample only ticks one value in dropdown.

    Thanks.
    Nikita.


    nikitaso
    Participant

    Hi Dimitar,

    Here’s slightly modified code, I added virtualmode and made it pageable.

    Now issue is when you add custom filter, it “check” two fields – only one.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="/scripts/jqwidgets-2-9-3/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="/scripts/jqwidgets-2-9-3/styles/jqx.axeomblue.css" type="text/css" />
    <script src="/scripts/jquery-1.10.1.min.js" type="text/javascript"></script>
    <script src="/scripts/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript" src="/scripts/jqwidgets-2-9-3/jqx-all.js"></script>
    <script src="gettheme.js" type="text/javascript"></script>
    <script type="text/javascript" src="generatedata.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();
    var data = generatedata(500);
    var source =
    {
    localdata: data,
    datafields:
    [
    { name: 'name', type: 'string' },
    { name: 'productname', type: 'string' },
    { name: 'available', type: 'bool' },
    { name: 'date', type: 'date' },
    { name: 'quantity', type: 'number' }
    ],
    datatype: "array"
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid(
    {
    width: 685,
    source: dataAdapter,
    showfilterrow: true,
    filterable: true,
    theme: theme,
    pageable: true,
    virtualmode: true,
    editable: true,
    pagesize: 50,
    rendergridrows: function(obj) {
    return obj.data;
    },
    columns: [
    { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', datafield: 'name', width: 115 },
    {
    text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220
    },
    { text: 'Available', datafield: 'available', columntype: 'checkbox', filtertype: 'bool', width: 67 },
    { text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd' },
    { text: 'Qty.', datafield: 'quantity', filtertype: 'number', cellsalign: 'right' }
    ]
    });
    $('#clearfilteringbutton').jqxButton({ height: 25, theme: theme });
    $('#clearfilteringbutton').click(function () {
    $("#jqxgrid").jqxGrid('clearfilters');
    });
    var presetlogidfilter = function () {
    $('#jqxgrid').jqxGrid('clearfilters');
    var fileids = ["Espresso con Panna", "Caramel Latte"]; // gets the file IDs from the other control. Strings like "000038010"
    if (fileids != null && fileids.length > 0) {
    var filtergroup = new $.jqx.filter();
    var filter_or_operator = 1;
    var filtercondition = 'equal';
    for (var i = 0; i < fileids.length; i++) {
    var filtervalue = fileids[i];
    var filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition); // this pre-filters, but the check lists are empty and as soon as a user opens the selection drop down, the filter is lost
    filtergroup.addfilter(filter_or_operator, filter1);
    }
    // add the filters.
    $('#jqxgrid').jqxGrid('addfilter', 'productname', filtergroup);
    // apply the filters.
    $('#jqxgrid').jqxGrid('applyfilters');
    };
    };
    $("#presetlogidfilterButton").click(function () {
    presetlogidfilter();
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id="jqxgrid">
    </div>
    <input style="margin-top: 10px;" value="Remove Filter" id="clearfilteringbutton"
    type="button" />
    <button id="presetlogidfilterButton">
    Filter Product column</button>
    </body>
    </html>
    in reply to: Refresh grid data source Refresh grid data source #25270

    nikitaso
    Participant

    i did a work around for filter, but it would be great for grid not to erase custom filter.
    Thank you!

    in reply to: Refresh grid data source Refresh grid data source #25209

    nikitaso
    Participant

    1. is possible not to erase?

    2. with version 2.8 i wasnt getting that error (i can setup two links with differetn versions).
    but this seems to work:
    i wrapped grid into another div ‘gridcontainer’
    var grid1 = $(“

    “);
    $(“#jqxgridContainer”).empty();
    $(“#jqxgridContainer”).append(grid1);

    3. item 2 fixes this one.

    in reply to: Refresh grid data source Refresh grid data source #25195

    nikitaso
    Participant

    Perhaps I’m doing something wrong, after it’s loaded click “Query 2”

    http://axeom.asyncbox.com/axeomquery

    Also, getfilterinfo api still not working. Grid erases custom filter.


    nikitaso
    Participant

    virtualmode must be true.

    that fixed.

Viewing 15 posts - 16 through 30 (of 40 total)