ddf200

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • in reply to: Row Selection #125848
    ddf200
    Participant

    Hi Will, I’ve tried various versions including adding multikey/multibox per your suggestion.  I’ve done so with and without the code I included in my initial post above.   But the behavior for selecting rows is not what I expected.  If I strip out my code and use your suggested parameters, it doesn’t allow for continuous row selection.

    What I really want is the same row selection behavior as what occurs with Google Mail and/or Yahoo Mail:  Choosing a group of continuous rows combined with  random non continuous rows.

    Both Gmail and Yahoo mail allow me to:

    Select rows 4 through 9 (click the first box row 4 without shift, then click the 9th row check box with Shift resulting in 6 rows selected.

    Then, and in addition to row 4 to 9, select individual rows 12 and then row 19 (checkbox click, no shift key).

    Total rows selected: 8

    Does jqgrid 5.1 support this, or are there any resources you can point me at that can provide this behavior?  I’m using jquery with bootstrap.

     

    in reply to: Vertical Scrolling Stuck/Frozen #125807
    ddf200
    Participant

    Actually, no, I wasn’t aware you require code examples to answer a known issues question.

    Is there a private channel I can provide you with login credentials?

    in reply to: colmenu #125112
    ddf200
    Participant

    Thanks for update on icons.  I’m making progress and I have a few more fixes to make based on your input.  Very helpful.  Thx

    in reply to: colmenu #125106
    ddf200
    Participant

    Screen shot links are broken above. Here they are again.

    Questions 3, 5, 6 here.

    Implementing your example code has formatting issues here.

    in reply to: colmenu #125105
    ddf200
    Participant
    in reply to: colmenu #125102
    ddf200
    Participant

    Thanks for your responses.

     

    For questions 3, 5, and 6, I’ve created a screen shot here:

     

    NEW question, this might be related to the above:

     

    Your example link was helpful.  I recreated it locally and I get similar formatting issues as above.  Screen shot of formatting issues:

    https://app.box.com/s/4jfrk4leh3yccoagzkljwfa1zju3omox" />

    I used jqgrid 5.1 .  I copied your example code then I changed the paths for the css and js, for my local drive, but it is similar to your original example.

    It feels like I’m missing a link to css or js?

    Here’s my code:

    [code]

    <!DOCTYPE html>

    <html lang="en">
    <head>
    <!– The jQuery library is a prerequisite for all jqSuite products –>
    <!– <script src="js/jquery-2.1.1.js"></script> –>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js" type="text/javascript"></script>

    <script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
    <!– We support more than 40 localizations –>
    <script src="js/plugins/jqGrid/i18n/grid.locale-en.js"></script>
    <!– This is the Javascript file of jqGrid –>
    <script src="js/plugins/jqGrid/jquery.jqGrid.min.js"></script>
    <!– This is the localization file of the grid controlling messages, labels, etc.
    <!– A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom –>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <!– The link to the CSS that the grid needs –>
    <link href="css/plugins/jqGrid/ui.jqgrid-bootstrap-ui.css" rel="stylesheet">
    <script>
    $.jgrid.defaults.width = 780;
    $.jgrid.defaults.responsive = true;
    $.jgrid.defaults.styleUI = ‘Bootstrap’;
    </script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <meta charset="utf-8" />
    <title>jqGrid Loading Data – Column Reordering</title>
    </head>
    <body>

    <style type="text/css">

    /* set the size of the datepicker search control for Order Date*/
    #ui-datepicker-div { font-size:11px; }

    /* set the size of the autocomplete search control*/
    .ui-menu-item {

    }

    .ui-autocomplete {
    font-size: 11px;
    }

    </style>
    <table id="jqGrid"></table>
    <div></div>
    &amp;amp;lt;script type="text/javascript"&amp;amp;gt;

    $(document).ready(function () {
    var filter;
    $("#jqGrid").jqGrid({

    url: ‘data.json’,
    mtype: "GET",
    datatype: "json",
    colModel: [
    { label : "Order ID",
    //sorttype: ‘integer’,
    name: ‘OrderID’,
    key: true,
    width: 75 ,
    colmenu : true,
    coloptions : {sorting:true, columns: true, filtering: true, seraching:true, grouping:false, freeze : true},
    searchoptions : {
    searchOperMenu : false,
    sopt : [‘eq’,’gt’,’lt’,’ge’,’le’]
    }
    },
    {
    label: "Customer ID",
    name: ‘CustomerID’,
    width: 150,
    hidedlg : true,
    // stype defines the search type control – in this case HTML select (dropdownlist)
    stype: "select",
    // searchoptions value – name values pairs for the dropdown – they will appear as options
    searchoptions: {
    value: " :[All];ALFKI:ALFKI;ANATR:ANATR;ANTON:ANTON;AROUT:AROUT;BERGS:BERGS;BLAUS:BLAUS;BLONP:BLONP;BOLID:BOLID;BONAP:BONAP;BOTTM:BOTTM;BSBEV:BSBEV;CACTU:CACTU;CENTC:CENTC;CHOPS:CHOPS;COMMI:COMMI;CONSH:CONSH;DRACD:DRACD;DUMON:DUMON;EASTC:EASTC;ERNSH:ERNSH;FAMIA:FAMIA;FOLIG:FOLIG;FOLKO:FOLKO;FRANK:FRANK;FRANR:FRANR;FRANS:FRANS;FURIB:FURIB;GALED:GALED;GODOS:GODOS;GOURL:GOURL;GREAL:GREAL;GROSR:GROSR;HANAR:HANAR;HILAA:HILAA;HUNGC:HUNGC;HUNGO:HUNGO;ISLAT:ISLAT;KOENE:KOENE;LACOR:LACOR;LAMAI:LAMAI;LAUGB:LAUGB;LAZYK:LAZYK;LEHMS:LEHMS;LETSS:LETSS;LILAS:LILAS;LINOD:LINOD;LONEP:LONEP;MAGAA:MAGAA;MAISD:MAISD;MEREP:MEREP;MORGK:MORGK;NORTS:NORTS;OCEAN:OCEAN;OLDWO:OLDWO;OTTIK:OTTIK;PERIC:PERIC;PICCO:PICCO;PRINI:PRINI;QUEDE:QUEDE;QUEEN:QUEEN;QUICK:QUICK;RANCH:RANCH;RATTC:RATTC;REGGC:REGGC;RICAR:RICAR;RICSU:RICSU;ROMEY:ROMEY;SANTG:SANTG;SAVEA:SAVEA;SEVES:SEVES;SIMOB:SIMOB;SPECD:SPECD;SPLIR:SPLIR;SUPRD:SUPRD;THEBI:THEBI;THECR:THECR;TOMSP:TOMSP;TORTU:TORTU;TRADH:TRADH;TRAIH:TRAIH;VAFFE:VAFFE;VICTE:VICTE;VINET:VINET;WANDK:WANDK;WARTH:WARTH;WELLI:WELLI;WHITC:WHITC;WILMK:WILMK;WOLZA:WOLZA"
    }
    },
    {
    label: "Order Date",
    name: ‘OrderDate’,
    width: 150,
    sorttype:’date’,
    formatter: ‘date’,
    srcformat: ‘Y-m-d’,
    stype : ‘text’,
    newformat: ‘n/j/Y’,
    searchoptions: {
    // dataInit is the client-side event that fires upon initializing the toolbar search field for a column
    // use it to place a third party control to customize the toolbar
    dataInit: function (element) {
    $(element).datepicker({
    id: ‘orderDate_datePicker’,
    dateFormat: ‘m/d/yy’,
    //minDate: new Date(2010, 0, 1),
    maxDate: new Date(2020, 0, 1),
    showOn: ‘focus’
    });
    }

    }
    },
    {
    label : "Ship Name",
    name: ‘ShipName’,
    width: 150,
    searchoptions: {
    // dataInit is the client-side event that fires upon initializing the toolbar search field for a column
    // use it to place a third party control to customize the toolbar

    dataInit: function (element) {
    $(element).autocomplete({
    id: ‘AutoComplete’,
    source: function(request, response){
    this.xhr = $.ajax({
    url: ‘http://trirand.com/blog/phpjqgrid/examples/jsonp/autocompletep.php?callback=?&amp;amp;amp;acelem=ShipName&#8217;,
    data: request,
    dataType: "jsonp",
    success: function( data ) {
    response( data );
    },
    error: function(model, response, options) {
    response([]);
    }
    });
    },
    autoFocus: true
    });
    },

    sopt : [‘cn’]
    }
    },
    {
    label: "Freight",
    sorttype: ‘number’,
    name: ‘Freight’,
    width: 150,
    sopt : [‘eq’]
    },
    ],
    loadonce: true,
    viewrecords: true,
    width: 780,
    height: 250,
    rowNum: 10,
    colMenu : true,
    shrinkToFit : true,
    pager: "#jqGridPager"
    });
    // activate the toolbar searching

    $(‘#jqGrid’).jqGrid(‘filterToolbar’,{
    stringResult: true,
    //searchOnEnter: false,
    searchOperators : true
    });

    $(‘#jqGrid’).jqGrid(‘navGrid’,"#jqGridPager", {
    search: false, // show search button on the toolbar
    add: false,
    edit: false,
    del: false,
    refresh: true
    });
    $("#save").click(function(){
    filter = $("#jqGrid").jqGrid(‘getGridParam’, ‘postData’).filters;
    var perm = [ 1, 0, 2, 4, 3 ];
    $("#jqGrid").jqGrid(‘remapColumns’, perm, true, false);
    console.log($("#jqGrid").jqGrid(‘getGridParam’,’colModel’));
    });
    $("#load").click(function(){
    console.log(filter);
    $("#jqGrid").jqGrid(‘refreshFilterToolbar’, {
    filters : filter,
    onClearVal: function ( elem, name) {
    if(name === ‘CustomerID’) {
    console.log(elem);
    elem.multiselect(‘refresh’);
    }
    },
    onSetVal: function ( elem, name) {
    if(name === ‘CustomerID’) {
    console.log(elem);
    elem.multiselect(‘refresh’);
    }
    }
    });
    });
    var timer;
    $("#search_cells").on("keyup", function() {
    var self = this;
    if(timer) { clearTimeout(timer); }
    timer = setTimeout(function(){
    //timer = null;
    $("#jqGrid").jqGrid(‘filterInput’, self.value);
    },0);
    });
    });

    &amp;amp;lt;/script&amp;amp;gt;

    &amp;amp;lt;/body&amp;amp;gt;
    &amp;amp;lt;/html&amp;amp;gt;

    &amp;amp;nbsp;

    [/code]

    • This reply was modified 9 years, 12 months ago by ddf200.
    • This reply was modified 9 years, 12 months ago by ddf200.
Viewing 6 replies - 1 through 6 (of 6 total)

Stay connected with us in your favorite flavor!