Databind Combobox

3 posts, 0 answers
  1. Meerkat
    Meerkat avatar
    64 posts
    Member since:
    Feb 2007

    Posted 18 Jul 2008 Link to this post

    Hello, I am having difficulty using your new ComboBox. I cannot find any documentation and your example project is not much help to me.
    I have an address form with

    Address
    Town
    County etc

    I would like to use your ComboBox to enable selection of a County.
    I have managed to fill the combox with a list of counties (using a web service)

    I would like to TwoWay bind the combox to the underlying datacontext so that the actual county is displayed instead of the first in the list. 
    Could you please tell me how to do this. The idea of what I am trying to do is very simple but please let me know if I have not explained clearly enough. An example showing how to use your combobox in a real life situation would be absolutely brilliant and I am sure would be useful to many users. Failing that, any help would be greatly appreciated.

    Many thanks,

    Pete.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 19 Jul 2008 Link to this post

    Hi Pete,

    The attached sample demonstrates how to synchronize two RadComboBox controls and a TextBlock using several bindings and a simple data context object. Important part is the INotifyPropertyChanged implementation in the data context object, which allows the bindings to work properly. If it doesn't help, I will need more information about your scenario and if possible, a very simple user control, demonstrating it. I will try to respond ASAP.

    Sincerely yours,
    Valeri Hristov (Silverlight Team)
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Meerkat
    Meerkat avatar
    64 posts
    Member since:
    Feb 2007

    Posted 20 Jul 2008 Link to this post

    Hello Valeri,
    I thank you for your reply but I don't think that is what I am looking for.
    Perhaps it is, am I am just being dumb. If this is the case then please accept my apologies for wasting your time.

    I think what I am trying to do is an extremely common task that people do every day.

    Someone types in their code ( or whatever ) and an address form appears which the user can amend.

    Address
    Town
    County etc.

    The details of this address form are obtained via a web service.
    getAddress(int code)
    The list of counties is also obtained via a web service
    getCounties()

    The County is your ComboBox filled with the list of counties.
    When it first appears, I would like the actual county of the user to be shown ( not necessarily the first county in the list )

    I would like to emphasize that the addresses are not all hard coded, but obtained from a database via a webservice.

    I would be really happy if you could show me an example of the above scenario because I am struggling, but perhaps that is too difficult.

    I appreciate your help very much and and more than willing to send you anything that might help you understand what I am trying to do. The obvious way would be to send you an example project but I do not know how to send you a zip file.

    Thanking you in anticipation,

    Pete

     

Back to Top