EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: peter on October 25, 2012, 01:32:52 AM



Title: Creating a link button in a grid
Post by: peter 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.


Title: Re: Creating a link button in a grid
Post by: stworthy 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();
  }
});