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

SelectedIndex = 'value' doesn't seem to work

1 Answer 71 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 10 Apr 2013, 12:15 AM
Hi,

I've upgraded to library version 2013.1.403.40.
For some reason I am unable to set the SelectedIndex value in code.

Example:
if (radListBox.SelectedIndex <= -1)
{
    radListBox.SelectedIndex = 0;
}
else
{
    radListBox.SelectedIndex++;
}


When the SelectedIndex = -1 and I try to set a value of 0, then the SelectedIndex value still remains as -1.
The same applies if I try SelectedIndex++.

Does anyone have suggestions? It used to work before upgrading.

Thanks,

Rob

1 Answer, 1 is accepted

Sort by
0
Ventzi
Telerik team
answered on 12 Apr 2013, 08:04 AM
Hi Robert,

We are not aware of such bug. I've tried to reproduce the problem, but unfortunately I couldn't. If you are using 2013.1.403.40 of RadControls would you get the latest internal build and try to reproduce the issue again? If you are still experiencing any issues, could you open a support ticket and send as a sample project that recreates the issue in order for us to be able to observe it on our side and see what could be the cause of it.

All the best,
Ventzi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ListBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Ventzi
Telerik team
Share this question
or