Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Disable "Add New Record" button - only disable, not hide it

$
0
0

Hello

 I'm trying to disable the "Add New Record" button in a Telerik RadGrid. I found many solutions to hide it, but what I want is that it's visible, but if the user clicks on it, it doesn't do anything. I found a way to disable the "InitInsertButton", but not the "AddNewRecordButton". Here you can see my e

 

GridCommandItem cmditem = (GridCommandItem)RadGrid1.MasterTableView.GetItems(GridItemType.CommandItem)[0];
Control ctrl = cmditem.FindControl("AddNewRecordButton");
ctrl.Visible = false;

LinkButton btn = (LinkButton)cmditem.FindControl("InitInsertButton");
btn.Enabled = false;

 

As you can see the "InitInsertButton" is disabled, but there is no property "Enabled" for System.Web.UI.Control so I don't know how to disable it as well.

Hope you can help me

Regards,
Danilo


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>