EasyUI Forum
May 14, 2024, 09:37:26 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Add combobox or searchbox programmaticaly in toolbar  (Read 6426 times)
y.bykov
Newbie
*
Posts: 49


View Profile
« 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!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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({
  //...
});
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #2 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?
Logged
qianet
Newbie
*
Posts: 9


View Profile Email
« Reply #3 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..
Logged
y.bykov
Newbie
*
Posts: 49


View Profile
« Reply #4 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
]
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!