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

set controls attribute (like: Enable/Disable ) on Insert/Edit mode using Jquery

5 Answers 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jayesh Goyani
Top achievements
Rank 2
Jayesh Goyani asked on 02 Sep 2011, 07:09 PM

Requirements

RadControls version 2011
.NET version 4.0
Visual Studio version 2010
programming language C#
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
in this demo, You can able to set the attribute or properties of the other controls in Insert or Edit mode using Jquery.
in addition, I already implemented code for based one combobox's value, enable/Disable the other radcomboboxs in Insert/Edit Mode.
It was worked for Inline and editform mode.

Let me know if any concern.

Thanks,
Jayesh Goyani

5 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 06 Sep 2011, 12:57 PM
Hi Jayesh,

Thank you for sharing your knowledge with the community.

However, the provided approach would work only in the specific case where the controls are nested directly inside the EditItemTemplate. Otherwise, the DOM tree would need to be inspected separately for each scenario and the code would need modifications. That is why we post this in the forums and not as a Code Library.

Additionally, you can find your Telerik points updated for contributing to the community resources.

Kind regards,
Tsvetina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Ajay
Top achievements
Rank 1
answered on 02 Dec 2011, 12:48 PM

Can you tell me how to modify this line disable a RadNumericTextBox:

 

var

 

RadComboBox2 = $("input[id*='" + sender.get_id() + "']").parent().parent().parent().find("div[id*='RadComboBox2']").attr("id");

 


Thanks in advance
0
Tsvetina
Telerik team
answered on 05 Dec 2011, 04:56 PM
Hello Ajay,

In order to give you a working sample code for your code we need to know what exactly is your scenario - when exactly you want to access the RadNumericTextBox and is the scenario identical to Jayesh's project with the only difference of having RadNumericTextBoxes.
Let us know about these details, and we will give you a relevant code sample.

Best wishes,
Tsvetina
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
0
Ajay
Top achievements
Rank 1
answered on 05 Dec 2011, 05:00 PM
My scenrio is similar to Jayesh. The only difference being I am using Numeric Text box and he is using drop down.
0
Tsvetina
Telerik team
answered on 05 Dec 2011, 05:11 PM
Hi Ajay,

Then, if you are also inside the OnClientSelectedIndexChanged event handler of another combo, try:
var txt = $find(sender.get_id().replace('RadComboBox1','RadNumericTextBox1')); //where the first ID is the one of the sender, combo and the second is of the numeric textbox that you are looking for
txt.disable();


Regards,
Tsvetina
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
Jayesh Goyani
Top achievements
Rank 2
Answers by
Tsvetina
Telerik team
Ajay
Top achievements
Rank 1
Share this question
or