Home > jQuery > jqGrid 3.5 beta

jqGrid 3.5 beta

May 24th, 2009

I’m very happy to publish jqGrid 3.5 beta version on this day.
The cahnges are so many so that I will not publish them here. If you download the release you will find a Changes.txt file.

Three very important things are happen with 3.5 beta
1. jQuery UI Theme integration.
2. New rendering engine, which improves the loading speed in some cases up to 10 time faster as of previous releases.
3. At end I have made a decision to remove the loader. From this release I introduce a new download manager which simplicity the procedure of settings the grid to work. Here you can choose what to download. All the files are splited in one file.

As usual the last development source code can be obtained from GitHub.

Do not forget to check the new things here

Enjoy!

Tags:
  1. Demetri
    August 18th, 2009 at 15:31 | #1

    @Dominique
    How to adjust jqGid font size:
    I found solution in the wiki Documentation ‘How to Install’
    http://www.trirand.com/jqgridwiki/doku.php?id=wiki:how_to_install

    just reduce the font size of body section,

    html, body {
    margin: 0;
    padding: 0;
    font-size: 75%;
    }

  2. August 22nd, 2009 at 22:36 | #2

    Hi Tony
    I am using your latest grid 3.5 and modifying it according to my needs. I have an issue. While resizing the column the whole columns get messed up ( even on initial load ).
    I had to comment this line from css
    /*
    .ui-jqgrid .ui-jqgrid-hbox
    {
    float:left;
    padding-right:20px;
    }
    */
    to show it properly on the initial load that alligned the headers and the data columns perfectly.
    But the columns(both data and header ) are still showing up less then the actual width of the whole table.
    This is what i have for the initialization of the grid.

    jQuery(“#jv-campaignGrid”).jqGrid({
    //url:’server.php?q=2′,
    url:”myUrl”,
    datatype: “JSON”,
    colNames:['Campaign Name','Status', 'Start Date', 'Total Contacts','Sent','Actions'],
    colModel:[
    { name:'name',index:'id', jsonmap:'name', width:150 },
    { name:'status',index:'invdate', jsonmap:'status', width:150 },
    { name:'startDate',index:'name asc, invdate', jsonmap:'startDate', width:150 },
    { name:'totalContacts',index:'amount', width:150, jsonmap:'endDate', align:"right" },
    { name:'JobvitesSent',index:'tax', width:150, jsonmap:'userId', align:"right" },
    { name:'Actions',index:'total', width:150, jsonmap:'type', align:"right" }
    ],
    jQuery(‘#pager2′),
    viewrecords: true,
    //height: 300,
    jsonReader : {
    root: “resultList”,
    page: “page”,
    total: “total”,
    records: “count”,
    repeatitems: false,
    cell: “”,
    id: “0″,
    }
    });

    Not sure what i am doing wrong. Any help would be greatly appreciated.
    Thanks
    Varun

  3. August 23rd, 2009 at 03:32 | #3

    i figured out the problem. I put the jqgrid in the tag that was messing up the whole css. For now i have removed the center tags from the page.

  4. August 23rd, 2009 at 03:33 | #4

    <center> the rendering removed the tag name from the text.

  5. zeke0
    August 31st, 2009 at 21:17 | #5

    @Demetri
    don’t work for me,
    try
    table {
    font-size:98%
    }

  6. September 4th, 2009 at 13:33 | #6

    Dear all,

    Am dealing with a problem in pagination.
    My queries are completely correct.
    When I am in the second page of a jqgrid and press sort by one column it returns me
    to the first page again.
    As I realize the browser sent the first page every time i press in the head columns sorting.

    Can anyone give a solution if there is?

    Thanks in advance,

    Kostis

  7. Carlos
    September 4th, 2009 at 22:59 | #7

    Great work with the grid Tony, thanks so much for your contribution…I have the following question though: Is there a way or a property that can be set on the grid so that it doesn’t wrap text. Right now, if the text goes over the columns width, all that shows up is three dots “…” We want to be able to show all the text on the column so that it can be scanned quicky without having to hover over the column to view the contents. Thanks again!

  8. Kaifi
    September 16th, 2009 at 09:33 | #8

    Hi Tony,
    I dont need to say that its a great plugin ever made..
    but i have issue :(, i want to use a separate url for my searching needs but it is using the “editurl” property can i change it to something else?how?
    plz reply asap…
    thanks :)

  9. Kumar
    September 22nd, 2009 at 10:37 | #9

    Even after putting jquery.searchFilter.js can’t able to search multiple conditions in IE6 and IE7…

  10. Casey
    September 30th, 2009 at 20:19 | #10

    Nice plugin.

    I’m using the grid (version 3.5) to bind to a javascript array of data. All CRUD operations are being done on the client. I’d like to keep the rows limited to 4 per ‘page’ of data. When ever I add the fifth row, the new row is appended to the current ‘page’ of data and not to a new ‘page’ of data. I set the ‘rownum’ property to 4 inside the option too. This method adds a new record and immediately put it into edit mode using the inline edit methods:

    function AddNew()
    {
    var grid = $(‘#CodeGrid’);
    var total = grid.getGridParam(‘records’);
    grid.addRowData(total + 1, emptyItem); // add a new row with empty data
    SetupActions(‘CodeGrid’, total + 1); // set up some CRUD buttons
    grid.editRow(total + 1); // put new row into inline-edit mode
    ToggleEditMode(‘CodeGrid’, total + 1); // disable/enable some buttons
    }

    Is there some way to add the new row to a new page of data?

  11. Casey
    October 5th, 2009 at 21:30 | #11

    OK, I figured out how to do deal with my paging issue. If anyone’s interested:

    function AddNew()
    {
    var grid = jQuery(‘#CodeGrid’);
    var total = parseInt(grid.getGridParam(‘records’), 10); // get total records
    var maxRow = grid.getGridParam(‘rowNum’);// get rows per page
    if ((total + 1) % maxRow == 1) { // if the next row needs to be on next page
    var nextPagenum = Math.ceil((total + 1) / maxRow); // calc next page
    grid.setPostDataItem(‘page’, nextPagenum.toString());// set post data
    grid[0].p.page = nextPagenum.toString();// set page number
    }
    emptyItem.id = total + 1; // set empty item’s id
    _dataArray.push(emptyItem); // add to local array first
    grid.trigger(“reloadGrid”); // trigger reload to get data from a function
    SetupActions(‘CodeGrid’, -1); // set up CRUD buttons
    grid.editRow(total + 1); // put new row into ‘edit mode’
    }

  12. bill_mouse
    October 11th, 2009 at 14:09 | #12

    I try to integrate the jqgride with grails, and successed using firefox but failed in ie6&7. There is a script error when jqgrid call the Json-url. Any advise?

  13. MN
    November 15th, 2009 at 10:26 | #13

    I want to convert html table to grid, but there is an jserror : Microsoft JScript runtime error: ‘colModel[...].name’ is null or not an object

    my html code is

    Find by name: <input size="40" name="q" value="”/>

    Name

    <input type="hidden" name="pg" value="” />
    <input type="button" class="editor-button" value="| << " name="btnpager" disabled=”disabled” onclick=”pg.value=’1′;this.form.submit()”/>
    <input type="button" class="editor-button" value=" << " name="btnpager" disabled=”disabled” onclick=”pg.value=”;this.form.submit()”/>

    <%for (int i = 1; i
    <option selected=”true” value=””>

    > ” name=”btnpager” disabled=”disabled” onclick=”pg.value=”;this.form.submit()”/>
    > |” name=”btnpager” disabled=”disabled” onclick=”pg.value=”;this.form.submit()”/>

    tableToGrid(“#tbl1″)

    I wonder if you could help me

  14. KEM
    November 23rd, 2009 at 13:09 | #14

    @Kevin

    Yes, Me too woluld like to see a feature like this. Wrapping of column header text should be possible.

  15. Brett Green
    December 3rd, 2009 at 04:47 | #15

    For the TableToGrid… make sure your table definition has thead and tbody sections as follows:

    col 1col 2

    data 1data 2

    Looks like the function looks for the thead to build colnames, etc.

  16. Deepalakshmik
    December 13th, 2009 at 21:57 | #16

    I am trying to get a grid working using xmlstring as the datatype. I am getting “E is null” error in firefox and node type is null error in IE. I am passing the following xmlstring to the grid.
    header(‘Content-type: text/xml;charset=utf-8′)1312122009-12-01450.0040.00490.00 112009-11-01860.0012.00872.00 102009-10-01780.0020.00800.00 92009-09-01345.0015.00360.00

    And I have pasted below my code for grid:

    drupal_add_js(

    jQuery(document).ready(function(){

    jQuery(\”#list\”).jqGrid({
    datatype: ‘xmlstring’,
    datastr: jgrid_data,
    colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
    colModel :[
    {name:'invid', index:'invid', width:55},
    {name:'invdate', index:'invdate', width:90},
    {name:'amount', index:'amount', width:80, align:'right'},
    {name:'tax', index:'tax', width:80, align:'right'},
    {name:'total', index:'total', width:80, align:'right'},
    {name:'note', index:'note', width:150, sortable:false}
    ],
    height: ‘auto’,
    pager: ‘#pager’,
    rowNum: 4,
    viewrecords: true,
    caption: ‘My first grid’
    });

    });
    “, “inline”
    );
    Please let me know what the problem is. I am not able to proceed forward because of this error.

    Thanks in advance

  17. Siddharth
    December 15th, 2009 at 11:13 | #17

    Hi,
    I want to edit the table row using jquery ‘tableToGrid’,But dunno how to proceed as there is no reference available for that.
    So, Please let me know how to edit the table row while using ‘tableToGrid’. Any suggestions/help related to this will be highly appreciated.

    Thanks.

  18. RajSadagopan
    December 17th, 2009 at 22:20 | #18

    Hi,

    I would like to have an example of how to use jqGrid with JSP? All the examples in the web site talks only about using PHP. Any help is appreciated.

    Thanks

  19. December 27th, 2009 at 23:52 | #19

    @Deepalakshmik
    ithink this problem is related to XML content type. i had the same problem and solved it with this header:

    header(“Content-type:text/xml;charset=utf-8″,true);

    Give the second parameter as true to override any previous content type header.

  20. Pablo
    January 14th, 2010 at 21:32 | #20

    Hi guys, i’m having some issues. Once I completed filters and try to search, I get he “loading” splash and the overlay dissapears, letting to manipulate the grid. I want to keep the grid inactive until I close the search modal. Thanks!

    jQuery(“#list”).jqGrid({
    url: ”,
    datatype: ‘json’,
    mtype: ‘GET’,
    loadui: ‘block’,
    multiselect: false,
    colNames: ['Id', 'Creada', 'Titulo', 'Opciones'],
    colModel: [
    { index: 'Id', hidden: true, search: false },
    { index: 'Creada', width: 50, align: 'left', searchoptions: { dataInit: datePick, sopt: ['le', 'ge', 'eq']} },
    { index: ‘Titulo’, width: 150, align: ‘left’, searchoptions: { sopt: ['cn']} },
    { index: ‘Opciones’, width: 50, formatter: formatOpciones, align: ‘center’, sortable: false, search: false }
    ],

    pager: jQuery(‘#pager’),
    rowNum: 8,
    rowList: [8, 15, 20],
    sortname: ‘Creada’,
    sortorder: ‘desc’,
    viewrecords: true,
    imgpath: ‘/content/cupertino/images’,
    height: 240,
    width: 867,
    hidegrid: false
    //});
    }).navGrid(jQuery(‘#pager’), { search: true, edit: false, add: false, del: false, searchtext: “Buscar” },
    {}, // default settings for edit
    {}, // default settings for add
    {}, // delete instead that del:false we need this
    {closeAfterSearch: false, drag: false, closeOnEscape: true }, // search options
    {} /* view parameters*/

    );

    });

  21. amit kumar
    March 8th, 2010 at 14:56 | #21

    @Carlos
    hi Calos, did you get the solution. I’m also facing the same problem. Please forward me the solution, if you have already figured out. Thank you.

  22. karim
    March 17th, 2010 at 13:57 | #22

    Please Tony,
    Why the number of fields in the xls file after the export does’nt depass 1000 fields???

  23. May 11th, 2010 at 21:12 | #23

    Tony,

    I’m trying to open a new window in the onCellSelect event and can’t get it to work.

    onCellSelect: function(rowid,iCol,cellcontent){
    if (iCol == 0)
    $(‘a[href="myserver/pti/parview/#shipdetail.cfm?ThisSN='+cellcontent+'"]‘).attr(“target”, “_blank”);
    },

    How can I do this? thanks, Jim

  24. July 3rd, 2010 at 10:00 | #24

    hi i’m trying with editing_data/edit_types/ and i want to set edit form with size and text input length ,how i set this edit form ?

  25. Ozahata
    August 10th, 2010 at 14:30 | #25

    @zeke0
    You need insert this tag in the first line of html:

  26. Ozahata
    August 10th, 2010 at 14:33 | #26

    Demetri :
    @Dominique
    How to adjust jqGid font size:
    I found solution in the wiki Documentation ‘How to Install’
    http://www.trirand.com/jqgridwiki/doku.php?id=wiki:how_to_install
    just reduce the font size of body section,

    html, body {
    margin: 0;
    padding: 0;
    font-size: 75%;
    }

    You need insert this tag in the first line of html:
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

  27. Andre
    September 17th, 2010 at 11:00 | #27

    Hi, All. How are we get value of all column from jqgrid? What sintax do I used?

  28. Pedro
    November 16th, 2010 at 15:27 | #28

    @Ozahata

    That is exactly right! I sat with these styling issues for hours trying different things. The solution of having inline styles did not sit well with me and your solution fixed the problems.

    Thanks for that

Comment pages
1 5 6 7 362
Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information