selected index not working when use editable combobox

2 posts, 0 answers
  1. Jiju
    Jiju avatar
    57 posts
    Member since:
    Jul 2011

    Posted 11 Nov 2014 Link to this post


    I am using a rad combobox in my web page, as below

    <telerik:RadComboBox ID="textboxCombo" AllowCustomText="true" runat="server"></telerik:RadComboBox>

    when I just select the combobox value then I will get the selected index value, but when I select the value and then edit , then I am getting the selected index as -1, how can I get the selected index value even if I edit the selected value?

  2. Nencho
    Nencho avatar
    1446 posts

    Posted 14 Nov 2014 Link to this post

    Hello Jijo,

    In order to achieve the desired behavior, you can use a hidden field so you could store the last selected index and then access it when needed. Please consider the below implementation at the OnClientSelectedIndexChanged:

    <script type="text/javascript">
            function OnClientSelectedIndexChanged(sender, args) {
                var index = sender.get_selectedIndex();
                if (index != null) {
                    $get("hiddenField1").value = index;

    In addition, in the attachment, you could find an isolated sample page, where the above suggestion is implemented.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top