DataMemberBinding to field with Space in name

2 posts, 0 answers
  1. Joel Palmer
    Joel Palmer avatar
    175 posts
    Member since:
    May 2009

    Posted 11 Jun 2015 Link to this post

    How do I bind a DataColumn to a field that has a Space (" ") in the name?  In the code snippit, I need to bind a field called "English Identifier" to a DataColumn.  Thanks for your help.

     

    <telerik:RadGridView
        x:Name="gridView"
        Grid.Row="1"
        AutoGenerateColumns="False"
        ItemsSource="{Binding CoordinateMap}">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn
                Header="Name"
                DataMemberBinding="{Binding English Identifier}"
                IsReadOnly="True" />
            <telerik:GridViewDataColumn
                Header="IsCloseout"
                DataMemberBinding="{Binding IsCloseOut}"
                IsReadOnly="True" />
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Jun 2015 Link to this post

    Hello Joel,

    Those characters (i.e. spaces) are not valid for property names in .NET Framework. Therefore, you cannot pass an invalid Binding.Path.

    There are not special restriction we have introduced for RadGridView specifically, the base rules as to declaring properties in .NET Framework apply.

    Regards,
    Dimitrina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top