This is a migrated thread and some comments may be shown as answers.

DataMemberBinding to field with Space in name

1 Answer 199 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Joel Palmer
Top achievements
Rank 2
Joel Palmer asked on 11 Jun 2015, 03:47 PM

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>

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 12 Jun 2015, 01:34 PM
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
Tags
GridView
Asked by
Joel Palmer
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Share this question
or