This is a migrated thread and some comments may be shown as answers.

Hide RadComboBoxItem on server side and enable them on client side

1 Answer 178 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rajkumar Subramaniyam
Top achievements
Rank 1
Rajkumar Subramaniyam asked on 20 Sep 2010, 07:15 PM
Hi,

I need to hide the RadComboBoxItem on server side while binding it. But on client side i need to re-display them based on client side changes. I am able to set_visible(true) on client side. But when i set to visible = false on Server-Side, the comboBoxItem is not rendered.

Is there any solution to do that?

Thanks
-- Raj

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 21 Sep 2010, 02:02 PM
Hi Raj,


Set the style "display:none;" instead of Visible proeprty of RadComboBoxItem from code behind.

Here is the example:
RadComboBox1.Items[0].Style.Add("display", "none");

And in the Client code:
function setVisibility() {
    var combo = $find("<%= RadComboBox1.ClientID %>");
    var item = combo.findItemByText("RadComboBoxItem1");
    item.get_element().style.display = "block";
}


Thanks,
Princy.
Tags
ComboBox
Asked by
Rajkumar Subramaniyam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or