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

[Solved] Removing a link from CommandItem

1 Answer 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahyar
Top achievements
Rank 1
Mahyar asked on 09 Jan 2008, 03:28 PM
HI

Is there any way to customuze CommandItem bar in Grid. I would like to remove the "Add new Record" link from the CommandItem how can I do that?

Thanks,
Mahyar

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 09 Jan 2008, 03:44 PM
Hi Mahyar,

The easiest way is to define your own CommandItemTemplate similar to this example:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/CommandItem/DefaultCS.aspx

Other possible solution is to set Visible false for desired button in ItemCreated. Here is an example:

if(e.Item is GridCommandItem)
{
    Button btn = (Button)e.Item.FindControl("InitInsertButton");
    btn.Visible = false;
}

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Mahyar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or