Can't access columns by x:name...

3 posts, 1 answers
  1. James
    James avatar
    119 posts
    Member since:
    Mar 2009

    Posted 29 Jul 2010 Link to this post


    More an observation than anything else, but I was wondering why you can't access GridViewDataColumns by their name? I can call them x:name="MyGridViewDataColumn", but when I try to access this in the 'code behind' it is always null. it's easy enough to access via GridView.Columns[index], but it seems strange having the ability to give the columns names, but not to be able to use them.

  2. Answer
    Vlad avatar
    11100 posts

    Posted 29 Jul 2010 Link to this post

    Hello James,

     Grid columns are plain DependencyObjects - you can reference only UI elements this way.

    Kind regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Luis Takada
    Luis Takada avatar
    3 posts
    Member since:
    Jun 2010

    Posted 14 Oct 2011 Link to this post

    I have the same problem when changing my control from WPF to Silverlight. My question is why does it work in WPF and not in Silverlight?
Back to Top