Home > jQuery > Help Testing jqGrid 3.4 beta

Help Testing jqGrid 3.4 beta

January 11th, 2009 Leave a comment Go to comments

After lot of hard work we are pleased to announce a 3.4 beta release of jqGrid. This version should not be used in production, since it will be quite possible to change some things. Please post any bugs or recommendations in the forum.
The release can be downloaded from Releses menu. Whitin the package there is a readme file which describes all changes and how to use the new things.
Here in brief what is new

New modules
grid.import.js – jqGrid import/export module
json2.js – json utils used in import/export module
JsonXml.js – xmljson utils used in import/export module
jquery.fmatter.js – jqGrid formater – thanks to Joshua Burnett.

All these modules are included in jquery.jqGrid.js

New Theme
Thanks to Joshua Burnett now we have a steel theme

What is New

  • Custom and predefined cell formating (links,checkboxes,mail, numbers, currency, date, select) Also added new parameter in colModel – formatter.
    See how to use in readme.txt of the zip
  • Dynamically load the grid configuration and data from xml, xmlstring, jsonstring Added two new methods jqGridImport(params) and jqGridExport(params);
    See how to use in readme.txt of the zip
  • Dynamic scrolling grid. Added new parameter scroll (default false). When enabled the pager elements are disabled and we can use the vertical scrollbar to load data. This option currently should be used carefully on big data sets, since I do not have developed
    inteligent swaper. That mean that all the data is loaded and a lot of memory will be used if the dataset if big. You must be a sure to have a initial verticall scroll in grid.
    I.e. the height auto should not be set.
  • To the colModel is added new Parameter ‘label’. This set the header content of the grid. That mean – If you do not want to use colNames array (to set header cells) you can set the names via label property. In case the label is not set we use the name.
    All this is true if the colNames array is empty.
    If the colNames array is set (not empty) they have higer priority.
  • Added new param multiboxonly (boolean). Default false. This option work only with multiselect. When both are set to true we have selection only when the checkbox is clicked
    (yahoo style)
  • Removed dynamically added title when we mouseover the column. We set it during the insertion of data. This allow to change the title dynamically. Typicall this can be used in afterInsertRow event combined with setCell method – see below
    the new added parameter in setCell;
  • To setCell method is added 5 parameter (array) – attribute properties which sets the attribute properies of the cell. Example
    jQuery(“#mygrid”).setCell(“rowid25″,”Myname”,”NewData”,”,{title:’mynewtitle’});
    Set new Title of the cell specified with rowid25 and name Myname
  • The select values in editing module can now be set as array too. That mean if we have
    colModel : [
    {name:’mynale’,edittype:’select’ editoptions:{value:”1:One;2:Two”}}

    ]
    This can be used this way
    colModel : [
    {name:’myname’,edittype:’select’, editoptions:{value:{1:’One’,2:’Two’}}}

    ]
    Both are correct and can be used as select definition.
  • Added second parameter in setSelection – (onselectrow) (true or false) default is true. If set to false the onSelectRow is not lunched;
  • The sorttypes when data is local are now compatible with formater. (see below).
  • When multiselect is set and we use onRightClickRow the row is not selected.
  • Subgrid Channges
    Added new methods
    — expandSubgridRow(rowid) – expand dynamically a subgrid row with the id = rowid
    — collapseSubGridRow(rowid) collapse dynamically a subgrid row with the id = rowid
    — toggleSubGridRow(rowid) toggle dynamically a subgrid row with the id = rowid
    — subGridJson(json, sid), subGridXml(xml, subid) (see below how to use these methods)
  • Added new parameter subgridtype. This allow us to load subgrid as service. Typically this parameter should be used only when the data provider for the subgrid is service. If not set it is equal of datatype parameter
  • In editing modules when requered is false and other checking is provided we do not alert a message when the data is empty.
    Example
    colModel: [
    {…editrules:{required:false,number:true..}…}

    ]
    In this case when the data is not filled by the user the alert message do not apper – i.e. in this case this is valid input.
Tags:
  1. Ed
    January 12th, 2009 at 05:33 | #1

    You guys should get a prize…excellent product!

  2. mliga
    January 12th, 2009 at 14:05 | #2

    The new feature list is impressive as always. Keep up the good work!
    Do you plan to update demos before releasing or publish some screenshot to preview the Steel theme?

  3. tony
    January 12th, 2009 at 17:37 | #3

    Hello,
    Demo page updated. Now you can preview how the new theme look.
    Tony

  4. Robbie
    January 13th, 2009 at 21:01 | #4

    The the 3.4 roadmap stated that the treegrid would support the “Adjacency List Model”. Did this get added?

  5. vinay kapoor
    January 14th, 2009 at 00:54 | #5

    Hi This is a great grid. I was making an attempt on the flexigrid but this is much superior. I am currently using this on an ASP.NET site. Addition of scroll is a good addition. Amazingly a lot of people are interested in the scroll version of the grid. I had 1 question though, is there a way/hack to freeze 1st 2 or 3 columns in the grid. I could use the expressions CSS for IE, but was wondering if you may have some other suggestions

  6. mliga
    January 14th, 2009 at 09:58 | #6

    Very cool!

  7. tony
    January 14th, 2009 at 16:37 | #7

    @Robbie – You are right. The work on this is just in progress. I hope to finish it for the final.

    @vinay – no plans for now for this, but it will be interested if you share your solution with others – for me too.

    Regards
    Tony

  8. vinay kapoor
    January 14th, 2009 at 20:02 | #8

    Tony another quick issue, I am using cellEdit: true, cellsubmit: ‘clientArray’ however after I am not able to set the value of the cell. The value of the cell being picked is blank. Do I have to call setCell in the afterSaveCell to set the value.
    Thanks
    Vinay

  9. vinay kapoor
    January 14th, 2009 at 20:47 | #9

    Tony I noticed a bug in the current release.
    On using the cellEdit: true feature, for some reason if the column names have a space, then the behavior changes. It is not able to detect the editted value, and on sorting the column the arrow showing the sort order also disappears. This exists in the latest beta and stable releases. Is there a way to go around this

  10. Kurt
    January 14th, 2009 at 21:51 | #10

    Fantastic Work!!!

    JQuery 1.3 was released today, will jqGrid 3.4 officially support it?? Doesn’t seem to be working now. The performance numbers for JQuery 1.3 are very impressive.

  11. michael
    January 15th, 2009 at 16:18 | #11

    Hello, very nice work guys!!!

    I am using the grid in a intranet tool for my company. Is there an planed date when the final version of 3.4 would be finished?

    Best Regards
    Micha

  12. murodc
    January 16th, 2009 at 10:43 | #12

    The best plugin of jQuery made by you.Thanks ,Tony,you are a good man.

  13. Spencer
    January 21st, 2009 at 01:19 | #13

    First, this is a very nice plug-in with an excellent feature set. Second, does anyone know if there are plans for jqGrid to work with jQuery UI Theme Roller? I noticed the jQuery team is talking about creating their own grid, but yours seems so complete it would be sad to see them try to replace it.

    Keep up the great work.

  14. Kouros
    January 23rd, 2009 at 18:04 | #14

    Thanks for the great work!

    JQuery 1.3.1 is out. When will jqGrid have official support for it?

    Great work!

  15. January 23rd, 2009 at 20:09 | #15

    Hey! Great work! I LOVE this grid and the way it’s evolving. I’ve been following the development and it is probably the best open source grid out there!
    And since i’m just loving it i wanted to contribute somehow.
    So looking at the other grids that are out there i realized that they are no match for jqGrid regarding the features. The only chapter where jqGrid might need some polishing is the look and feel. And.. ,although it’s a pity, the looks sell. So i thought i should start building a theme that would measure up to the brilliance of this grid. This theme should be slick and nice and work with all the plugins that come with jqGrid. I’ve already finished the theme for the base grid and some basic features (multiselect checkboxes, cellEdit, toolbar).
    I also wrote a few lines of code to make jqGrid resizable by mouse drag. So you can resize it by simply draging the handle (right bottom corner of the panel).

    I will put an example with my theme on the web the next days and post the link here.
    And about the dragresizing, I’d like to make a plugin out of it. But i have no clue how to write a plugin for jqGrid. I’d need some ‘pointing in the right direction’. Is there some documentation or a tutorial on writing a plugin for jqGrid?

    Thanks!

  16. January 25th, 2009 at 07:57 | #16

    Nice work! Thanks!

    Please setup a SVN with trunk and tags at Googlecode (or somewhere else).
    This will make vendor branching easier (direct link to the repository).

  17. January 28th, 2009 at 02:11 | #17

    For those who wonder, the readme.txt mentioned above was not included in beta2. I don’t know if this was done on purpose. If anyone wants it, I can post a link to it.

  18. vkapoor
    February 17th, 2009 at 16:22 | #18

    Just as a suggestion, scroll=true could load data from cache passing a page size (page-size=20) such that we oass the scroll position of the div and load only the 20 rows within the passed indices. This feature is currently in Dojo grids. This lazy loading enables loading of large datasets very fast and will be very desirable. I see some great potential in this grid.

  19. rfinner
    February 19th, 2009 at 02:42 | #19

    I had a problem with loading jqGrid using json from a Microsoft wcf service. wcf wraps all data returned in a “d” tag/property. This is done as a simple countermeasure against certain types of forgery attacks. I simply added the following line to the addJSONData function of the grid.base.js file: if(data.d) data = data.d
    Cheers!

  20. rfinner
    February 19th, 2009 at 03:27 | #20

    No rows or columns are displayed when using an explicit width like – width: “400px” or width: “1600px”
    I trying to get both horizontal and vertical scrolling to work within a div area.

    Thanks!

  21. March 11th, 2009 at 17:26 | #21

    expandSubgridRow seems to be expandSubGridRow in fact…

  22. kickah
    March 16th, 2009 at 23:08 | #22

    Hi,
    i have a problem with “multi-requesting” to grid builder.
    here is a code example:

    $(“select#ms_makers”).change(function(){
    buildElementsGrid($(this).val());
    });

  23. kickah
    March 16th, 2009 at 23:12 | #23

    Hi,
    i have a problem with “multi-requesting” to grid builder.
    the grid is loading only once – can’t populate on new request
    fom select changing…
    may i have to do something like “$(‘#m_elms_tbl’).clear();”…
    here is a code example:

    $(“select#ms_makers”).change(function(){
    var maker = $(this).val();
    $(‘#m_elms_tbl’).jqGrid({
    url:’request/series.php?nd=’+new Date().getTime()+’&maker=’+maker,
    datatype: “json”……….

    .
    });

  24. Prashant
    April 4th, 2009 at 15:14 | #24

    Hi,
    i have a problem with calling javascript function on grid link.
    Please reply.

  25. hgm
    April 14th, 2009 at 10:23 | #25

    @DizzyC
    Waiting for your dragresizing code? Can you share your code, please?

  26. Rahul
    May 4th, 2009 at 08:57 | #26

    can some one help me with javascript source code for insertion of data using jqgrid …… Thanks in advance..

  27. June 16th, 2009 at 14:13 | #27

    Hi James:

    Below is my code, I need to return the result as JSON, Please let me know how to do this.

    Note: I am not using asp.net mvc

    public string GetUsers(string sidx, string sord, int page, int rows)
    {
    int pageIndex = Convert.ToInt32(page) – 1;
    int pageSize = 10;
    int totalRecords = Context.Users.Count();
    int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);

    var users = Context.Users.Skip(pageIndex * pageSize).Take(pageSize);

    var jsonData = new
    {
    total = totalPages,
    page = page,
    records = totalRecords,
    rows = (
    from user in users
    select new
    {
    i = user.Pk,
    cell = new string[] { user.Pk.ToString(), user.FullName.ToString(), user.Email.ToString() }

    }).ToArray()
    };

    return jsonData.ToString();

    }

    sample output : to fit in JQGrid.
    {“page”:”1″,”total”:2,”records”:”13″,”rows”:[{“id”:”13″,”cell”:[“13″,”2007-10-06″,”Client 3″,”1000.00″,”0.00″,”1000.00”,null]},{“id”:”12″,”cell”:[“12″,”2007-10-06″,”Client 2″,”700.00″,”140.00″,”840.00”,null
    ]},{“id”:”11″,”cell”:[“11″,”2007-10-06″,”Client 1″,”600.00″,”120.00″,”720.00”,null]},{“id”:”10″,”cell”
    :[“10″,”2007-10-06″,”Client 2″,”100.00″,”20.00″,”120.00”,null]},{“id”:”9″,”cell”:[“9″,”2007-10-06″,”Client
    1″,”200.00″,”40.00″,”240.00”,null]},{“id”:”8″,”cell”:[“8″,”2007-10-06″,”Client 3″,”200.00″,”0.00″,”200
    .00”,null]},{“id”:”7″,”cell”:[“7″,”2007-10-05″,”Client 2″,”120.00″,”12.00″,”134.00”,null]},{“id”:”6″
    ,”cell”:[“6″,”2007-10-05″,”Client 1″,”50.00″,”10.00″,”60.00”,null]},{“id”:”5″,”cell”:[“5″,”2007-10-05″
    ,”Client 3″,”100.00″,”0.00″,”100.00″,”no tax”]},{“id”:”4″,”cell”:[“4″,”2007-10-04″,”Client 3″,”150.00″
    ,”0.00″,”150.00″,”no tax”]}]}

  28. mdanese
    July 17th, 2009 at 02:48 | #28

    I am stuck trying to switch themes. I have (exhaustively) toggled the grid.css style from various themes with little or no visible change in the grid. Also have reviewed the info related to themeroller but am missing something. There must be a function eg: “jQuery.(#mygrid”)jqGrid.setThemeBase(‘../scripts/jqGrid3.5/css/coffee’)” no?
    Can someone provide a tip for me here please.

  29. sun
    July 25th, 2009 at 10:55 | #29

    How to freeze column?

  30. greatbelzoni
    October 20th, 2009 at 18:04 | #30

    I have a cell that sometimes contains a lot of text including tags. Firefox expands vertically to show all the content, but IE clips the content. Has anyone else run into this problem and found a solution?

  31. jan
    March 9th, 2010 at 11:33 | #31

    Hello ..
    Just want to know how to clear the jqGrid? I tried to use the thegrid.clearGridData(); but it generates error.

  32. Naidu
    June 18th, 2010 at 21:21 | #32

    Hi Team,
    Can you also provide some demo work for using it with Oracle APEX.

  33. Pallab Ghosh
    July 16th, 2010 at 09:43 | #33

    Hi,
    This is a great grid.
    There are many many excellent features.
    but one important feature is absent or not developed.
    that is Freeze columns.
    until then i cant use it in my application.

  34. Vamshi
    August 13th, 2010 at 23:02 | #34

    @Naidu
    Hi Naidu,

    Did you have any luck in finding a demo for APEX ? Please let me know if you find one. Thanks
    Vamshi

  35. Saleem
    August 26th, 2010 at 07:42 | #35

    Hi All
    I am facing an issue while loading large dataset (around 6000 records). paging is enabled. But initial load is very slow and always ended up with slow script error of IE.

    thanks in advance.

  36. gnanaxavier
    August 23rd, 2012 at 10:31 | #36

    Hi can v freeze the last 2 columns of jqgrid

  1. No trackbacks yet.

Privacy Policy   Terms and Conditions   Contact Information