jQuery UI Widgets › Forums › Grid › row details problem
Tagged: hide, jqxgrid, row details, show
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 9 years ago.
-
Authorrow details problem Posts
-
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, ..............................
Hello evgen_2411,
Please take a look this example:
http://jsfiddle.net/hristoxux/97nL59x8/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comso… 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 datasorry for my bad english
Hello evgen_2411,
Thanks for using our product. The widget works on this way.
I hope this workaround will be helpful.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.