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

[Solved] Manage Add new record command link

1 Answer 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PM
Top achievements
Rank 1
PM asked on 03 Dec 2009, 12:13 PM
Hi All,

How can i manage(visible true/false) command item "add new record" in radgrid using c#.

please help me regarding this.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Dec 2009, 01:45 PM
Hello Praveen,

I recommend you examine the following code to remove the AddNewRecord button form the command item row of the grid:
C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)   
{   
    GridItem cmdItem = RadGrid1.MasterTableView.GetItems(GridItemType.CommandItem)[0];   
    cmdItem.FindControl("AddNewRecordButton").Parent.Visible = false;   
}

I hope this helps.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
PM
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or