java - Dynamically add kendo grid inside panel of kendo panelbar in JSP -


i using kendo ui in java jsp application.

i able load panel bar dynamically want insert grid 1 of panels when user clicks panel. got select/expand event catch action not sure how insert grid there.

any suggestions or pointers appreciated. thanks!

function createattendancepanel(){  $("#attendance-details").kendopanelbar({          expandmode: "multiple",         select: selectattndpanel         });     var attendancepanelbar = $("#attendance-details").kendopanelbar().data("kendopanelbar");  attendancepanelbar.append({text: "absence year", id:"item1"}, attendancepanelbar.select()); }; 

this function called when select particular element after page loaded.

now when panel text "absence year" expanded or selected want add grid panel.

thanks,

here solution, in case 1 looking it:

first append panel "content" has div element

panelbar.append(

    {         text: "<b>item 2</b>",         encoded: false,                                          content: "<div id='grid'></div>"                     } ); 

now, convert div grid.

var grid= $("#grid").kendogrid({ datasource: datasource,
scrollable: false,
editable : true, navigatable: true, toolbar: ["save","cancel", "create"], columns: ["id", "name", "position"]
}).data("kendogrid");


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -