Hi all, I have an ASP.NET repeater and inside it, some Telerik Web Controls (as shown below)
I would chkProva checkbox to enable/disable all controls inside repeater item.
How can I get it client-side? Is it possible?
I've tried with the following javascript code in the HEAD tags
but I get the following errore message at runtime:
because (I suppose) it can't find the rRadComboBoxTipoScopertura control inside repeater...
In alternative it could be done server-side with an Ajax Panel solution... but how?
Thanks to all!
Giulio
<asp:Repeater ID="rptAreeScopertura" runat="server"> |
<HeaderTemplate> |
<table class="Tabella"> |
<tr> |
<th class="CellaIntestazione" style="width: 40px;"> |
<asp:Label ID="lblSelezionaTitolo" runat="server" /> |
</th> |
<th class="CellaIntestazione" style="width: 200px;"> |
<asp:Label ID="lblAreaScoperturaTitolo" runat="server" /> |
</th> |
<th class="CellaIntestazione" style="width: 80px;"> |
<asp:Label ID="lblTipoScoperturaTitolo" runat="server" /> |
</th> |
<th class="CellaIntestazione" style="width: 140px;"> |
<asp:Label ID="lblTipoServizioInclusoTitolo" runat="server" /> |
</th> |
<th class="CellaIntestazione" style="width: 350px;"> |
<asp:Label ID="lblTipoPeriodicitaOffertaTitolo" runat="server" /> |
</th> |
</tr> |
</HeaderTemplate> |
<ItemTemplate> |
<tr> |
<td style="text-align: center;"> |
<input type="checkbox" id="chkProva" value='<%# Eval("IDAreaScopertura") %>' runat="server" |
onclick="toggleTB(this);" /> |
</td> |
<td> |
<asp:Label ID="lblAreaScopertura" runat="server" Text='<%# Eval("AreaScopertura") %>' /> |
</td> |
<td> |
<telerik:RadComboBox ID="rRadComboBoxTipoScopertura" runat="server" /> |
</td> |
<td> |
<telerik:RadComboBox ID="rRadComboBoxTipoServizioIncluso" runat="server" /> |
</td> |
<td style="text-align: center;"> |
<telerik:RadComboBox ID="rRadComboBoxTipoPeriodicitaOfferta" runat="server" /> |
<asp:Label ID="lblOppure" runat="server" /> |
<telerik:RadTextBox ID="rRadTextBoxTipoPeriodicitaPersonalizzata" runat="server" /> |
</td> |
</tr> |
</ItemTemplate> |
<FooterTemplate> |
</table> |
</FooterTemplate> |
</asp:Repeater> |
How can I get it client-side? Is it possible?
I've tried with the following javascript code in the HEAD tags
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript"> |
function toggleTB(what) { |
var RadComboBox = $find("<%= rRadComboBoxTipoScopertura.ClientID %>"); |
RadComboBox.enabled = what.checked; |
} |
</script> |
</telerik:RadCodeBlock> |
but I get the following errore message at runtime:
Name 'rRadComboBoxTipoScopertura' not declared. |
Error in the following code source (Row 11): |
Row 9: |
Row 10: function toggleTB(what) { |
Row 11: var RadComboBox = $find("<%= rRadComboBoxTipoScopertura.ClientID %>"); |
Row 12: RadComboBox.disable(); |
Row 13: } |
because (I suppose) it can't find the rRadComboBoxTipoScopertura control inside repeater...
In alternative it could be done server-side with an Ajax Panel solution... but how?
Thanks to all!
Giulio