GridViewComboBoxColumn from ENUM

4 posts, 0 answers
  1. Felix
    Felix avatar
    11 posts
    Member since:
    Nov 2010

    Posted 06 Jun 2011 Link to this post

    Hi,

        After researching the forum and all available examples I still have a problem.
        Dear Telerik team members, before you post here an examples please make sure you read carefully this question:

        I have a simple enum (for populating GridViewComboBoxColumn options), and integer value representing the current  value for each row/combobox
        I need to bind the enum to the GridViewComboBoxColumn using XAML only (without setting the code-behind as I use MVVM) and without creating for this an extra custom class
        In all examples that I found on your web site you use an extra custom class to represent the data and connect it to the GridVeiw

        Please provide an example that will have a DataGrid with GridViewComboBoxColumn that is databinded to an enum directly

        Thank you!
  2. John
    John avatar
    6 posts
    Member since:
    May 2014

    Posted 11 Aug 2014 in reply to Felix Link to this post

    Felix,

    I'm still working on a similar solution.  Did you ever figure out how to bind your GridViewComboBoxColumn to an enum?  I've got the binding working, but no drop down value is selected when the data is populated.

    Thanks,
    John
  3. Boris
    Admin
    Boris avatar
    276 posts

    Posted 13 Aug 2014 Link to this post

    Hello John,

    You can check our ComboBoxColumn WPF / Silverlight demo. In it, on the left side of the screen you will find a RadComboBox, from which you can choose what kind of binding you want to use. For example there is an option for "Simple binding to enum" that will suit your case.

    In addition there is another approach with which you can achieve something similar. All you need to do is replace the GridViewComboBoxColumn with any other column and set its CellTemplate property to contain a RadComboBox. Then follow the example in this How to bind an ItemsControl to the values of an enumeration blog post. 

    I hope this helps.

    Regards,
    Boris Penev
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  4. Joel Palmer
    Joel Palmer avatar
    175 posts
    Member since:
    May 2009

    Posted 08 Jan 2017 Link to this post

    Your "How to bind..." link is invalid.
Back to Top