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

[Solved] Add a string before every selected value

1 Answer 243 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shilpa Reddy
Top achievements
Rank 1
Shilpa Reddy asked on 15 Jan 2010, 04:35 PM
Hi There!

            I have binded radcomboBox with some static data (Yellow, Blue, Pink, Green).
So when ever I select some value it should show in the radcomboBox as "Selected Yellow" like that.
The "selected" should not show in the list of Item.

Please help me with this. It is very urgent. Please respond me ASAP.

Thank You,
--Shilpa

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Jan 2010, 07:22 AM
Hello Shilpa,

Attach 'OnClientSelectedIndexChanged' event to combo and try the following code in order to set the text as required.

Client-side code:
 
<script type="text/javascript"
    function OnClientSelectedIndexChanged(sender, args) { 
        sender.set_text("Selected : " + args.get_item().get_text()); 
    } 
</script> 

-Shinu.
Tags
ComboBox
Asked by
Shilpa Reddy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or