Databinding on SelectedIndex property

10 posts, 1 answers
  1. Paul
    Paul avatar
    25 posts
    Member since:
    Jul 2010

    Posted 17 Dec 2010 Link to this post

    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.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 22 Dec 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Paul
    Paul avatar
    25 posts
    Member since:
    Jul 2010

    Posted 22 Dec 2010 Link to this post

    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.
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 27 Dec 2010 Link to this post

    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.
  6. Paul
    Paul avatar
    25 posts
    Member since:
    Jul 2010

    Posted 07 Jan 2011 Link to this post

    Hi Peter

    Sorry for the delay. I have posted a ticket.

    Regards


    Paul.
  7. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 11 Jan 2011 Link to this post

    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.
  8. Paul
    Paul avatar
    25 posts
    Member since:
    Jul 2010

    Posted 11 Jan 2011 Link to this post

    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.
  9. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 14 Jan 2011 Link to this post

    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.
  10. Paul
    Paul avatar
    25 posts
    Member since:
    Jul 2010

    Posted 14 Jan 2011 Link to this post

    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.
  11. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 19 Jan 2011 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready