Hi,
I have just started using the Telerik controls recently had a question which was frustrating me. I have a grid with a popup edit form. Inside the edit form I want to certain table rows depending on if the user clicks a button. I have registered the Jquery library in my masterpage already, and when i click the button the change happens only for a second then dissapears and the original rows are back. How can I persist the jquery change im trying to make? I even tried with an html button but it still does the same thing. There has to be a way to do simple functions like hide/show table rows, can someone point that out please look below. This is the table in the Edit pop up form and down below is the Radcodeblock with the javascript. Thanks in advance!
<
table
id
=
"tblEditPopup"
style
=
"width:100%; height:100%"
>
<
tr
id
=
"trProduct"
>
<
td
align
=
"right"
>
Select Product:
</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"cboxCustomers"
runat
=
"server"
AutoPostBack
=
"true"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"Select Product"
/>
<
telerik:RadComboBoxItem
Text
=
"Apple"
Value
=
"Apple"
/>
<
telerik:RadComboBoxItem
Text
=
"Bananas"
Value
=
"Bananas"
/>
</
Items
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
id
=
"trService"
style
=
"display:none"
>
<
td
align
=
"right"
>
Select Service:
</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"cboxServices"
runat
=
"server"
AutoPostBack
=
"true"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"Select Service"
/>
<
telerik:RadComboBoxItem
Text
=
"Deliver Home"
Value
=
"Delivery"
/>
<
telerik:RadComboBoxItem
Text
=
"Order By Mail"
Value
=
"Mail"
/>
</
Items
>
<
telerik:RadComboBox
>
</
td
>
</
tr
>
<tr>
<td>
<button id="BtnService" onclick="toggle()" >Choose Service</button>
</td>
</tr>
</
table
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function toggle() {
$('#trProduct').css('display', 'none');
$('#trService').css('display', 'block');
}
</
script
>
</
telerik:RadCodeBlock
>