问题
I have a Radgrid call Grid1. Inside the RadGrid I like to make a field RadEditor invisible programatically
<telerik:GridTemplateColumn DataField="Description" FilterControlAltText="Filter Description column"
HeaderText="Description" SortExpression="Description" UniqueName="Description">
<EditItemTemplate>
<telerik:RadEditor StripFormattingOnPaste="MSWord" ID="LimitEdit" runat="server" Content='<%# Bind("Description") %>'
Skin="Windows7">
</telerik:RadEditor>
</EditItemTemplate>
I tried the following code but did not seem to work:
if (e.CommandName == "Edit")
{
var gridItem = e.Item as GridEditableItem;
if ("ActionItems".Equals(e.Item.OwnerTableView.Name))
{
var radEditor = editItem.FindControl("LimitEdit") as RadEditor;
radEditor.Visible = false;
}
}
When I do the above code it says that it cannot find LimitEdit
来源:https://stackoverflow.com/questions/35417963/make-radeditor-invisible-in-radgrid