Hayri ASLAN Posted December 2, 2015 Share Posted December 2, 2015 Hi, in this example we are seeing 2 button on top of grid. http://dev.sencha.com/ext/5.1.0/examples/grid/row-editing.html when we look the source we can see that buttons adding to tbar. I tried to get this but couldn't. How can i add buttons to tbar? Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2015 Share Posted December 2, 2015 Hi, If I correctly understood you, a simple example, try: UniDBGrid1 -> ,,, function beforeInit(sender, config) { sender.tbar = [{ text: 'Add Employee', //iconCls: 'your icon class', handler : function() { alert("Add Employee"); //your logic } }] } Best regards. 1 Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted December 2, 2015 Author Share Posted December 2, 2015 Delphi Developer Thank you so much. Link to comment Share on other sites More sharing options...
Freeman35 Posted January 26, 2018 Share Posted January 26, 2018 Hello, I get some question, 1- How can I change disabled true/false of itemid: '_Edit' in runtime (delphi) 2- How can change text font's property / css not change I couldn't find that 3- How can I change heigth of tbar. default is auto, I wanna add more space buttom of button (need for shadow) Thank you function beforeInit(sender, config) { sender.tbar = [{ disabled: true, itemId:'_Edit', text: 'Add Employee', //iconCls: 'your icon class', handler : function() { alert("Add Employee"); //your logic } }] } Link to comment Share on other sites More sharing options...
Sherzod Posted January 26, 2018 Share Posted January 26, 2018 Hello, 1- How can I change disabled true/false of itemid: '_Edit' in runtime (delphi) One possible solution, try this: Enable: UniDBGrid1.JSInterface.JSCode('var item='#1'.query("[itemId=_Edit]")[0]; if (item){item.setDisabled(false)};'); Disable: UniDBGrid1.JSInterface.JSCode('var item='#1'.query("[itemId=_Edit]")[0]; if (item){item.setDisabled(true)};'); Link to comment Share on other sites More sharing options...
Freeman35 Posted January 26, 2018 Share Posted January 26, 2018 Thnak you, another perfedt solution, I hope you have solution for 2. & 3. question too regrads Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2018 Share Posted January 27, 2018 Hello, 2- How can change text font's property / css not change I couldn't find that 3- How can I change heigth of tbar. default is auto, I wanna add more space buttom of button (need for shadow) Please, can you explain a little more what you wanted ?! Link to comment Share on other sites More sharing options...
Freeman35 Posted February 20, 2018 Share Posted February 20, 2018 Hi, You can see on screenshot. I wanna change button's color to white and make bold, sometime change font name etc. I wanna change button's parent height. for example. On screenshot. I added empty (button without caption string and "sender.tbar = [ {disabled: true, height:33, width: 1} ,") then other buttons height can be small. This fake button set toolbar panel's height. Can I set this different way? Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now