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

Rad ComboBox Text Not Changing

7 Answers 441 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Santhosh
Top achievements
Rank 1
Santhosh asked on 26 Mar 2014, 01:47 PM
Hi


RadComboBox Text is displaying first item in list.with out selecting Pls Help Me Out.

Thanks,
Santhosh

7 Answers, 1 is accepted

Sort by
0
Santhosh
Top achievements
Rank 1
answered on 26 Mar 2014, 02:52 PM
Hi

If I removed MarkAsFirst Its Coming.I need Mark as first too.


Thanks
Santhosh
0
Shinu
Top achievements
Rank 2
answered on 27 Mar 2014, 04:23 AM
Hi Santhosh,

I guess that you want to show a text in the RadComboBox if no item is selected, for that try to set the EmptyMessage Property of RadComboBox. The EmptyMessage property of the RadComboBox enables the ability to set any text in the input field of the control. This text is not visible when the combobox gets the focus and appears again on blur if no item is selected.

Please elaborate your requirement if it doesn't help.
Thanks,
Shinu.
0
Santhosh
Top achievements
Rank 1
answered on 27 Mar 2014, 05:45 AM
Hi Shinu,

     Thanks for your replay,I have used EmptyMessage,MarkAsFirst and CheckBoxes  Properties.
     If I Checked one Item(Showing Checked Text--No Problem with that) and Closed the combobox and then Opened It
     and Unchecked the Existing one  and  Closed.
     If no items checked it should show EmptyMessage Property value but its Showing The Item which i have checked first.

    If I Remove MarkAsFirst Property Its Showing Properly but i need MarkAsFirst.

Thanks,
Santhosh
0
Shinu
Top achievements
Rank 2
answered on 28 Mar 2014, 03:15 AM
Hi Santhosh,

As a work around please try the following code snippet which works fine at my end.

ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" EmptyMessage="select" CheckBoxes="true"
    OnClientItemChecked="OnClientItemChecked" MarkFirstMatch="true">
    <Items>
        <telerik:RadComboBoxItem Text="Item1" />
        <telerik:RadComboBoxItem Text="Item2" />
    </Items>
</telerik:RadComboBox>

JavaScript:
<script type="text/javascript">
    function OnClientItemChecked(sender, args) {
        if (sender.get_checkedItems().length == 0) {
            sender.clearSelection();
            sender.set_emptyMessage("select");
        }
    }
</script>

Hope this will helps you.
Thanks,
Shinu.
0
Santhosh
Top achievements
Rank 1
answered on 16 Apr 2014, 02:24 PM
hi,

RadComboBox Not Allowing Spaces if i specify combo box to true and markfirstmatch to true.


thanks
Santhosh
0
Shinu
Top achievements
Rank 2
answered on 19 Apr 2014, 03:22 AM
Hi Santhosh,

As far as my knowledge there is no such issue is in RadComboBox. If the RadComboBox have Items with space it will allow to enter the space. RadComboBox MarkFirstMatch property will automatically completes the string to the first matching item in the list. The provided information is not enough to replicate the issue, please provide a sample code snippet where I can reproduce the issue for further help.

Thanks,
Shinu.
0
Majeed
Top achievements
Rank 1
answered on 21 Nov 2016, 07:34 AM

Dear Shinu I am facing the related the RadComboBox.

When i allowed checkbox="True" to the radcombobox than it doesn`t allow me to enter space like i wanna search "Director General Health" but when I enter Director and Put space it select first value and refresh the search baar,

kindly help me please.

Regards:

Majeed kha

majeedkhan.pk@hotmail.com

Tags
ComboBox
Asked by
Santhosh
Top achievements
Rank 1
Answers by
Santhosh
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Majeed
Top achievements
Rank 1
Share this question
or