c# - How do I find all controls of a particular type from a page inside a master page? -
i have enable/disable via javascript radcomboboxes page, inside master page. pointed simple tutorial (http://www.telerik.com/support/kb/aspnet-ajax/general/how-to-create-a-javascript-array-of-all-particular-radcontrols-on-the-page.aspx), insted of finding telerik radcontrols in page, returns me radcontrols of master page. there's i'm missing point out want controls of page inside master page?
this have (allradcontrols return me radsplitter, radpane ans radbuttons master page)
function disablesave(habilita, botao) { var btsalvar = $find(botao); if (btsalvar != null) { var allradcontrols = $telerik.radcontrols; if (habilita == "true") { btsalvar.set_enabled(true); $("#<%=pnlprincipal.clientid%>").find("input,a,textarea,table").attr("disabled", false); } else { btsalvar.set_enabled(false); $("#<%=pnlprincipal.clientid%>").find("input,a,textarea,table").attr("disabled", true); } }
radcombobox exposes array @ client-side contains radcombobox instances. array can accessed like:
telerik.web.ui.radcombobox.comboboxes
for example:
if radcombobox controls embedded in control, can these controls array described above.
here example of radcombobox nested inside grid:
<telerik:radgrid id="radgrid1" runat="server" ...> ... <edititemtemplate> <telerik:radcombobox id="radcombobox1" runat="server"></telerik:radcombobox> <telerik:radcombobox id="radcombobox2" runat="server"></telerik:radcombobox> <telerik:radcombobox id="radcombobox3" runat="server"></telerik:radcombobox> </edititemtemplate> ... </telerik:radgrid>
and here javascript code:
<script> function pageload() { var combo1 = telerik.web.ui.radcombobox.comboboxes[0]; var combo2 = telerik.web.ui.radcombobox.comboboxes[1]; var combo3 = telerik.web.ui.radcombobox.comboboxes[2]; } </script>
here documentation link:
http://www.telerik.com/help/aspnet-ajax/combobox-client-side-basics.html
hope helps...
Comments
Post a Comment