selectedindex is 0 on autocomplete suggest

The "selectedindex" property of sfcombox is not updating when i select a value with "autocomplete" property set.

6 Replies 1 reply marked as answer

BR Bharathi Rajakantham Syncfusion Team October 14, 2020 03:26 PM UTC

Hi Sajin, 
 
We are able to reproduce the reported issue from our side.we have forwarded it to our development team.We will update you the further details on october 16 2020. 
 
 
Regards, 
Bharathi R 



BR Bharathi Rajakantham Syncfusion Team October 16, 2020 02:25 PM UTC

Hi Sajin, 
 
Thanks for contacting syncfusion support. 
 
We have analyzed the reported case and found that it is the correct behavior.While enabling AutoComplete mode as Suggest and type a letter in Single Selection mode, it will clear the old items in listview and suggest the items based on the typed value. In that time, as per the behavior SelectedIndex will be updated based on the new items collection. If you need a original index of that item, you can get it from the original items collection. 
 
 
Please let us know if you have anyother concerns. 
 
 
Regards, 
Bharathi R 



SA Sajin October 17, 2020 07:54 AM UTC

Hi,

My requirement is to get the original index of that autocomplete appended or suggested item.
could you please help me achieve this.
Please provide any code sample.

regards,
Sajin


VR Vijayalakshmi Roopkumar Syncfusion Team October 19, 2020 12:58 PM UTC

Hi Sajin

Thank you for update.

Query : My requirement is to get the original index of that autocomplete appended or suggested item.

We have currently working on the reported the reported requirement and we will update you the details by tomorrow 21st Oct, 2020.

Please let us know if you have any other concerns.

Regards,
Vijayalakshmi VR


VR Vijayalakshmi Roopkumar Syncfusion Team October 19, 2020 01:03 PM UTC

Hi Sajin

Please ignore the previous update.

Thank you for update.

Query : My requirement is to get the original index of that autocomplete appended or suggested item.

We have currently working on the reported requirement and we will update you the details by 21st Oct, 2020.

Please let us know if you have any other concerns.

Regards,
Vijayalakshmi VR


VR Vijayalakshmi Roopkumar Syncfusion Team October 21, 2020 02:50 PM UTC

Hi Sajin 
 
As per our previous update, we could not get the original index of dropdown item of sfcombobox when Autocomplete is enabled. To get the original index of dropdown , you can use the  selectedindex changed event of SfComboBox as shown in following code. In case you want to maintain the original index when autocomplete is enabled, then you can save this index in any local variable and used in your application: 
 
Code: 
 
 
  private void SfComboBox2_SelectedIndexChanged(object sender, EventArgs e) 
         
        { 
            var indexvalue = this.sfComboBox2.SelectedIndex; 
            MessageBox.Show(indexvalue.ToString()); 
            
        } 
 
 
  
 
Please let us know if you have any other concerns. 
 
Regards, 
Vijayalakshmi VR 


Marked as answer
Loader.
Up arrow icon