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

[Solved] Edit form Button and control enable and disable

1 Answer 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Palanivelrajan
Top achievements
Rank 1
Palanivelrajan asked on 25 Mar 2013, 12:27 PM
Dear All/Support Team,

I have requirement to display record in a telerik grid with one column as View with Icon. on click view icon it open the edit form and render the  required control with two button as per the code given below. ie Inser/Update and Cancel button.

Now I am bale to either disable and enable the control on load, but I want to enable all the control in edit form on clicking the buttons(ie adding Edit button in the form). if I have to add Edit button as per my requirement in the following code, how to enable all control with client side code and avoid server side post back. How Edit button command event is set to none instead of  CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' or
 / CommandName="Cancel"


<td align="left" colspan="3">
    <asp:ImageButton ID="btnInsert" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
        ImageUrl="~/Images/Update.gif" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
        ToolTip="Save To Grid" ValidationGroup="ValDecision" /> 
    <asp:ImageButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
        ImageUrl="~/Images/Cancel.gif" ToolTip="Cancel" />
</td>

Kindly guide me on the same

With Regards
Palanivelrajan

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 28 Mar 2013, 12:00 PM
Hi Palanivelrajan,

I would suggest you to review the following help article where is demonstrated how to enabling/disabling a textbox in a FormTemplate. You could use the same approach to disable any other control in it.

Kind regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Palanivelrajan
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or