EasyUI Forum
May 04, 2024, 12:54:13 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: Creating a link button in a grid  (Read 6242 times)
peter
Newbie
*
Posts: 10


View Profile
« on: October 25, 2012, 01:32:52 AM »

I have a grid table and want to create a link button in some of the elements.
Getting a link is no problem. The thing I haven't managed is to make it look like a link button.

Any help would be appreciated.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 25, 2012, 06:27:58 AM »

Suppose the datagrid data contains "<a href='#' class='aa'>A Link</a>" that will be created as linkbutton. When the data is loaded successfully, find the '<a>' and call 'linkbutton' to create it.
Code:
$('#dg').datagrid({
  onLoadSuccess:function(){
    $(this).datagrid('getPanel').find('a.aa').linkbutton();
  }
});
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!