I have a master table with its own server-side datasource. If you click edit the edit form comes up and display some textboxes to edit and a grid that has an edit column on it. the master also has a couple buttons for Update/Insert and a Cancel. These buttons work for the master datasource only. So the user clicks on the edit column for the row in the child grid and it has a edit form too that opens. This has its own Update/Insert and Cancel buttons. I need to disable the Master grid image buttons for Update/insert and Delete, then re-enable when the user is out of Edit mode on the child grid.
the two buttons "RadButtonUpdate..." and "RadButtonCancel..." should be disabled when...
...the grid (RadGridEventSub) above goes into edit mode. RadGridEventSub is part of the FormTemplate.
Can you explain how to achieve this? thanks!
<%-- Edit form master event template --%> <EditFormSettings EditFormType="Template"> <FormTemplate> <div class="data-container"> <fieldset id="FieldsetEventMasterEdit" runat="server" style="width: 97%; height: 110px; margin: 5px; background-color: #FFFFCC;" class="ui-widget ui-widget-content ui-corner-all"> <div style="float: left;"> <asp:Label runat="server"><b>* denotes required field</b></asp:Label> </div> <div style="float: right;"> <asp:Table runat="server"> <asp:TableRow> <asp:TableCell> <telerik:RadButton ID="RadButtonUpdateMasterEvent" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>' runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>' UseSubmitBehavior="false" /> </asp:TableCell> <asp:TableCell> <telerik:RadButton ID="RadButtonCancelMasterEvent" Text="Close" runat="server" CausesValidation="False" CommandName="Cancel" UseSubmitBehavior="false" /> </asp:TableCell></asp:TableRow> </asp:Table>the two buttons "RadButtonUpdate..." and "RadButtonCancel..." should be disabled when...
<telerik:RadGrid runat="server" ID="RadGridEventSub" Height="100%" Width="100%" AllowMultiRowSelection="false" AutoGenerateColumns="false" OnItemCommand="RadGridEventSub_ItemCommand" OnDeleteCommand="RadGridEventSub_DeleteCommand" OnInsertCommand="RadGridEventSub_InsertCommand" OnUpdateCommand="RadGridEventSub_UpdateCommand" OnNeedDataSource="RadGridEventSub_NeedDataSource" OnItemDataBound="RadGridEventSub_ItemDataBound" OnItemCreated="RadGridEventSub_ItemCreated" AllowAutomaticUpdates="false" AllowAutomaticInserts="false"> <MasterTableView CommandItemDisplay="Top" NoMasterRecordsText="There are no events to display..." AllowAutomaticInserts="false" AllowAutomaticUpdates="false" DataKeyNames="EventMasterId, EventSubId, GroupId, Name, EventTypeId" EditMode="EditForms"> <CommandItemSettings AddNewRecordText="Add a new sub event" ShowRefreshButton="false" /> <Columns> <%-- this is the Pencil column for editing the record --%> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center"> <ItemStyle CssClass="GridRecordButton" /> </telerik:GridEditCommandColumn>...the grid (RadGridEventSub) above goes into edit mode. RadGridEventSub is part of the FormTemplate.
Can you explain how to achieve this? thanks!