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

Databinding on SelectedIndex property

9 Answers 412 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 17 Dec 2010, 02:00 PM
Hi I'm using Q3-2010 and I have installed the latest Service pack released yesterday and it has made no difference.

The problem I have is when I bind to the "SelectedIndex" property of the DropDownList. It works fine with other properties like "Text" but not with selectedindex.

Any suggestions please ?

Regards


Paul.

9 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Dec 2010, 02:41 PM
Hi Paul,

Thank you for writing.

By default, the property SelectedIndex is not bindable, but you can bind with simple binding manually.
Could you please clarify what exactly you want to achieve?

Currently, if you bind this property manually, it should update properly.

I hope this helps.

Kind regards,
Peter
the Telerik team
Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
0
Paul
Top achievements
Rank 1
answered on 22 Dec 2010, 02:52 PM
Hi Peter

Thanks for your reply. I do bind manually using the code shown below:


control.DataBatabinding.Add("selectedindex",bindingsource,"fieldname")


Where "control" is the raddropdownlist, "bindingsource" is the datasource and "fieldname" is the data member.

If I change the property from "selectedindex" to "text" and change the data member from an Integer to a String then it works.

It also used to work on the dropdownlist's replacement. The radcombobox.

Hope this makes sense.

Regards


Paul.
0
Peter
Telerik team
answered on 27 Dec 2010, 04:27 PM
Hi Paul,

I was not able to reproduce the described issue. Please, could you create a sample project where the issue can be reproduced and send it to me. This will help me to investigate the case in detail and provide the proper solution. Thank you in advance.

I am looking forward to your project.

Best wishes, Peter
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Paul
Top achievements
Rank 1
answered on 07 Jan 2011, 12:34 PM
Hi Peter

Sorry for the delay. I have posted a ticket.

Regards


Paul.
0
Peter
Telerik team
answered on 11 Jan 2011, 01:05 PM
Hi Paul,

Thank you for the provided project.

We concluded that this scenario is not supported by the Windows Forms controls, because Microsoft ComboBox behaves the same way RadDropDownList does. Please refer to the modified project.
We could suggest that you bind the RadDropDownList instances to the same data-source - in this case they should be synchronized better.

Thank you again for your cooperation.

Kind regards,
Peter
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Paul
Top achievements
Rank 1
answered on 11 Jan 2011, 01:25 PM
Hi Peter

I did try with the standard Combobox from Microsoft and it does work fine. I also tried your modified version (after taking out the warnings) and that works too.

It also used to work on the dropdownlist's replacement. The radcombobox.

Any suggestions ?

Regards


Paul.
0
Peter
Telerik team
answered on 14 Jan 2011, 10:36 AM
Hello Paul,

It seems that we have a misunderstanding of what exactly you expect from the combobox, because from what we understood about your requirement, MS ComboBox is not working. However, considering your latest statement, it seems that your requirement is different. Please describe the exact scenario that you want to achieve. Provide us with a details step-by-step guide of the steps that you performed (in the attached project) and the result that you achieved and that is expected.

Thank you for your cooperation. I am looking forward to your response.

Regards,

Peter
the Telerik team

 

Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Paul
Top achievements
Rank 1
answered on 14 Jan 2011, 11:03 AM
Hi Peter

I have added to my support ticket regarding this issue because I cannot attach zip files here.

Many thanks for your help.


Regards


Paul.
0
Accepted
Peter
Telerik team
answered on 19 Jan 2011, 01:38 PM
Hi Paul,

Please find the answer in the support ticket that you have opened.

Best wishes,
Peter
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Tags
DropDownList
Asked by
Paul
Top achievements
Rank 1
Answers by
Peter
Telerik team
Paul
Top achievements
Rank 1
Share this question
or