This is a migrated thread and some comments may be shown as answers.

change the button's text

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 22 Oct 2012, 11:43 AM
hii,
 how to change the button's text of autogenerated delete and edit
column ?

thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Oct 2012, 11:45 AM
Hi Hash,

Try the following code snippet to achieve your scenario.

C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            LinkButton btnDelete = (LinkButton)item["AutoGeneratedDeleteColumn"].Controls[0];
            btnDelete.Text = "NewText";
            LinkButton btnEdit = (LinkButton)item["AutoGeneratedEditColumn"].Controls[0];
            btnEdit.Text = "NewText";
       }
     }

Hope this helps.

Regards,
Princy.
Tags
Grid
Asked by
beeta one
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or