EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: y.bykov on June 15, 2017, 03:39:39 AM



Title: Add combobox or searchbox programmaticaly in toolbar
Post by: y.bykov on June 15, 2017, 03:39:39 AM
Hello!
Is it possible to add combobox or searchbox programmaticaly in toolbar like in example?
http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem=DataGrid%20Complex%20Toolbar
Thank you!


Title: Re: Add combobox or searchbox programmaticaly in toolbar
Post by: stworthy on June 16, 2017, 04:22:12 AM
Please look at this example:
Code:
var tb = $('#tb');  // the toolbar container
var sb = $('<input>').appendTo(tb);  // append the search box to the toolbar
sb.searchbox({
  //...
});


Title: Re: Add combobox or searchbox programmaticaly in toolbar
Post by: y.bykov on June 16, 2017, 05:27:52 AM
Ok, thank you! And one more, please.
I want buttons in left part of toolbar and searchbox & combobox in right part.
Is it possible?


Title: Re: Add combobox or searchbox programmaticaly in toolbar
Post by: qianet on June 18, 2017, 08:06:15 AM
toolbar:'#tb'

<div id='tb'>
    <div>
       <a....class='easyui-linkbutton'....></a>
    </div>
    <div>
        ohter button or textbox or ....
    </div>
</div>

use css set elements..


Title: Re: Add combobox or searchbox programmaticaly in toolbar
Post by: y.bykov on June 18, 2017, 08:54:26 AM
I know this variant, thank you. But I need to create it's programmatically like
toolbar: [
    button1,
    button2,
    button3,
    'delimeter',
    combobox1,
    searchbox
]