How to visible false in RadGridview EditFormSettings using java script

1 Answer 142 Views
Grid
Ilaya
Top achievements
Rank 1
Ilaya asked on 06 Dec 2021, 10:01 AM

Class Type - RadCombobox

Value=1  text=one  --> Select this value --> visible radcombobox 1 (Textbox1 visible false)

value=2  text=two --> Select this value--> visible radcombobox 1 (Textbox1 visible false)

value=3 text=others --> visible Textbox1 --> radcombobox 1(visible false)

then i click the class Type(Others)

 

all the controls in RadGriview.

 

i need solution using javascript

Please help.....

 

Attila Antal
Telerik team
commented on 08 Dec 2021, 12:43 PM

Hi Ilaya,

Do I understand that you have 2 combo boxes in the same row, and if selecting an item in Combo1 will change the visibility of Combo2?

Also, can you share the RadGrid markup code so that we can see how it was configured?

Ilaya
Top achievements
Rank 1
commented on 09 Dec 2021, 05:57 AM

 <EditFormSettings EditFormType="Template">
                                                <FormTemplate>
                                                    <table>

<td>
                                                                <telerik:RadComboBox ID="TYPE" runat="server" Width="175px" EmptyMessage="Type"
                                                                    AllowCustomText="true" EnableLoadOnDemand="True"  CustomErrorMessage="Please Select the Type"
                                                                    Enabled="true" EnableTextSelection="false">
                                                                </telerik:RadComboBox>
                                                            </td>

<td>Garage Name <span class="asterix">*</span></td>
                                                            <td class="lablenobg">
                                                                <telerik:RadComboBox ID="CODE" runat="server" Width="250px" Height="200px" EnableLoadOnDemand="True"
                                                                    MandatoryYesNo="true" AllowCustomText="true" CustomErrorMessage="Please Select Code">
                                                                    <WebServiceSettings Method="GetList" Path="WebMethod.aspx" />
                                                                </telerik:RadComboBox>
                                                                <telerik:RadTextBox runat="server" ID="TYPE_OTH" Width="150px" ></telerik:RadTextBox>
                                                            </td>

 

When OTHERS selected in combo box(ID is TYPE) is selected, then TYPE_OTH should be Visible=TRUE and CODE should be Visible=FALSE

Apart from OTHERS selected in combo box(ID is TYPE) is selected, then TYPE_OTH should be Visible=FALSE and CODE should be Visible=FALSE

Above functionality i need in JAVA SCRIPT. Please help on this code.

1 Answer, 1 is accepted

Sort by
0
Attila Antal
Telerik team
answered on 09 Dec 2021, 05:47 PM

Hi Ilaya,

Thanks for the details.

We do not have an example specifically for this scenario, however, using the client-side APIs, you can do it.

You get a reference to RadGrid, then to its Edit form, find the ComboBoxes in it, and make them visible/hidden accordingly.

Here are some articles that will help you out:

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Ilaya
Top achievements
Rank 1
Answers by
Attila Antal
Telerik team
Share this question
or