Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Telerik GridViewComboBoxColumn

Telerik GridViewComboBoxColumn

Scheduled Pinned Locked Moved WPF
csshelpquestiondiscussionannouncement
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eddieangel
    wrote on last edited by
    #1

    I realize that this is not a Telerik forum but I also poured through their forums to no avail. Long story short, I am using NHibernate to hydrate my viewmodels and exposing complex objects with their related objects to my view. The issue is that in my grid I have a combobox column that has a collection of objects from the viewmodel, the selectedvalue of which will update the object of the selected item. When I change the combobox everything is great, everything is talking back and forth, all is well. But when I close the control and reopen it, it does not select any value for the column. All code is cut for brevity: View:

    ViewModel:

        public ObservableCollection Clients { get; private set;}
    

    Entity:

    public class Claim : Entity
    {
    public virtual Client Client { get; set; }
    }

    NHibernate Mapping

    public ClaimMap()
    {
    Table("Claim");
    LazyLoad();
    Id(x => x.Id).GeneratedBy.Identity().Column("id");
    References(x => x.Client).Column("clientId").Not.Nullable();
    }
    }
    }

    I am sure I could just expose the id values on the Claim object and wire it up that way but it really is swimming against the current of NHibernate to do so. Thoughts? Cheers, --EA

    Graeme_GrantG 1 Reply Last reply
    0
    • E eddieangel

      I realize that this is not a Telerik forum but I also poured through their forums to no avail. Long story short, I am using NHibernate to hydrate my viewmodels and exposing complex objects with their related objects to my view. The issue is that in my grid I have a combobox column that has a collection of objects from the viewmodel, the selectedvalue of which will update the object of the selected item. When I change the combobox everything is great, everything is talking back and forth, all is well. But when I close the control and reopen it, it does not select any value for the column. All code is cut for brevity: View:

      ViewModel:

          public ObservableCollection Clients { get; private set;}
      

      Entity:

      public class Claim : Entity
      {
      public virtual Client Client { get; set; }
      }

      NHibernate Mapping

      public ClaimMap()
      {
      Table("Claim");
      LazyLoad();
      Id(x => x.Id).GeneratedBy.Identity().Column("id");
      References(x => x.Client).Column("clientId").Not.Nullable();
      }
      }
      }

      I am sure I could just expose the id values on the Claim object and wire it up that way but it really is swimming against the current of NHibernate to do so. Thoughts? Cheers, --EA

      Graeme_GrantG Offline
      Graeme_GrantG Offline
      Graeme_Grant
      wrote on last edited by
      #2

      My guess would be that you're not using TwoWay binding.

      “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups