EasyUI Forum
October 13, 2024, 06:11:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datagrid and toolbar  (Read 2272 times)
Fabrice
Jr. Member
**
Posts: 62


View Profile
« on: August 07, 2023, 02:58:22 AM »

I have an accodion object with ten datagrids, each datagrid has a toolbar with two buttons.
i would like to use only one toolbar for all datagrids, so i don't want to give an "id" to these buttons.
how can i programmaticaly change iconCls of a button when an external event occurs if i don't know id of button but i know id of his datagrid.
Same question in handler of the button, i need to know id of his datagrid.

Logged
jarry
Administrator
Hero Member
*****
Posts: 2275


View Profile Email
« Reply #1 on: August 13, 2023, 11:49:42 PM »

Please call this code to get the toolbar bound to the datagrid. And then you will be able to access the buttons in the toolbar.
Code:
var tb = $('#dg').datagrid('options').toolbar;
...
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!