Title: Menubutton in datagrid toolbar Post by: y.bykov on February 02, 2018, 06:34:46 AM Hello!
I need menubutton (multi add actions) in my datagrid toolbar. I tryed to find decision in source but my effort was fail. Please explain, how to programmaticaly! create menubutton in datagrid toolbar. I already have few linkbuttons in toolbar. Thank you! Title: Re: Menubutton in datagrid toolbar Post by: stworthy on February 02, 2018, 11:50:38 PM The code below shows how to create a menubutton programmatically and append to the toolbar.
Code: var tb = ... // the toolbar Title: Re: Menubutton in datagrid toolbar Post by: y.bykov on February 03, 2018, 01:07:23 AM Thank you!
But it not work for me. I use toolbar like array (in datagrid object config) and in your example menubutton added to already exist toolbar. Title: Re: Menubutton in datagrid toolbar Post by: y.bykov on February 04, 2018, 12:15:52 AM I found decision but it take little source code update.
In datagrid toolbar we can use #id or array of linkbutton configs, but if add linkbutton element (or his childs) it takes little change in build grid method source code. In the toolbar create part (for->else) add checking Code: $.isPlainObject(btn) Code: element.appendTo(td) If it possible please include this feature in next patch/release. |