jQuery UI Widgets Forums Grid row details problem

This topic contains 3 replies, has 2 voices, and was last updated by  Hristo 8 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • row details problem #78285

    evgen_2411
    Participant

    Hello , i have a little probliem with grid row details, when i init grid with data, all work ok, but then, when im again select from database, and try to insert new data, details in row still opened, i tried to close data, however function initrow details call automaticaly. I dont want draw row data for new not opened rows

    each times i call

     function DrawEvents(data){
     var source =
                {
                    dataType: "json",
                    dataFields: [
                        { name: 'rec_id', type: 'number' },
                        { name: 'owner' , type: 'string'},
                        { name: 'parent_id', type: 'number' },
                        { name: 'title', type: 'string' },
                        { name: 'responsible', type: 'string' },
                        { name: 'resp', type: 'string'},
                        { name: 'date_end', type: 'string' },
                        { name: 'date', type: 'date' }
                        
                          
                    ],
                    localData: data
                };
                  var initrowdetails = function (index, parentElement, gridElement, datarecord) {
                    var notes = null;
                    var event_div = $($(parentElement).children()[0]);
                    if (event_div != null) {
                       var container = $('<div class="event_detail_wrap" data-id="'+datarecord.rec_id+'" style="margin: 5px;"></div>')
                        container.appendTo($(event_div));
                       doit("preview","get_event_detail",datarecord.rec_id);
                    }
                }
                var dataAdapter = new $.jqx.dataAdapter(source);
     $("#events_grid").jqxGrid(
                {
                    width: '100%',
                    source: dataAdapter,
                    sortable: true,
                    rowdetails: true,
                    enableBrowserSelection: true,
                    rowdetailstemplate: { rowdetails: "<div class='event_details' style='margin: 10px;'></div>", rowdetailsheight: 200 },
                    initrowdetails: initrowdetails,
                   ..............................
    row details problem #78334

    Hristo
    Participant

    Hello evgen_2411,

    Please take a look this example:
    http://jsfiddle.net/hristoxux/97nL59x8/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    row details problem #78337

    evgen_2411
    Participant

    so… this example also automitically open rows data… Of course i can on “ready:” write for i=0 rowscount {$(‘#grid’).jqxGrid(‘hiderowdetails’, i);}
    but why grid do it? for what grid remember opened rows when i put in grid new database data

    sorry for my bad english

    row details problem #78372

    Hristo
    Participant

    Hello evgen_2411,

    Thanks for using our product. The widget works on this way.
    I hope this workaround will be helpful.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.