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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s