How to add RadComboboxItem and attributes in clientside javascript


<script type="text/javascript">
        function pageLoad() {
            var RadComboBox1 = $find("<%=RadComboBox1.ClientID %>");
            var RadComboBox1Item = new Telerik.Web.UI.RadComboBoxItem();
            RadComboBox1Item.set_text("—Choose Employee—");
            RadComboBox1Item.set_value("-1");
            hdn_PatientName.value = lbl_Opdname.innerHTML;
            RadComboBox1Item.get_attributes().setAttribute("DefaultItem", "Yes");
            RadComboBox1Item.get_attributes().setAttribute("IsValid", "No");
            RadComboBox1.trackChanges();
            RadComboBox1.get_items().add(RadComboBox1Item);
            RadComboBox1Item.select();
            RadComboBox1.commitChanges();
            RadComboBox1Item.scrollIntoView();
        }
    </script>

Advertisements

How to set radwindow behaviors through ClientSide javascript


<script type=”text/javascript” language=”javascript”>
function ShowPopup() {
var oWnd = radopen(“Popups/Employees.aspx”, “radWin_Employees”);
oWnd.SetTitle(“Visitors”);
oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.None);
oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move);
}
</script>