EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Deiva on May 26, 2012, 09:22:30 PM



Title: how to render a linkbutton at grid?
Post by: Deiva on May 26, 2012, 09:22:30 PM
Code:
<table id="datagrid" url="ResultRecords.aspx" pagination="true" singleSelect="true" toolbar="#toolbar">
    <thead>
        <tr>
        <th field="SiteID" width="180">List ID</th>
        <th field="ResultId" width="40">button</th>
        </tr>
    </thead>
</table

I want to display a linkbutton at each data row.
Could someone tell me how to do?

I tried to use
Code:
    function formatReload(r, v, i) {
        return '<a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-save"></a>';
    }
but it failed.


Title: Re: how to render a linkbutton at grid?
Post by: stworthy on May 27, 2012, 12:12:05 AM
Try below code:
Code:
$('#datagrid').datagrid({
onLoadSuccess:function(){
$(this).datagrid('getPanel').find('a.easyui-linkbutton').linkbutton();
}
});


Title: Re: how to render a linkbutton at grid?
Post by: nprioleau on March 17, 2016, 06:25:38 AM
Did you ever figure this out? I am trying to do the same thing and no information available.