This question is locked. New answers and comments are not allowed.
I have some fairly simple data, the following is an example:
| public class State |
| { |
| public int StateID { get; set; } |
| public string StateName { get; set; } |
| } |
| public class Location |
| { |
| public string City { get; set; } |
| public int StateID { get; set; } |
| public string ZipCode { get; set; } |
| } |
My Grid is pretty simple with:
| <grid:RadGridView AutoGenerateColumns="False" |
| x:Name="cGrid" > |
| <grid:RadGridView.Columns> |
| <grid:GridViewDataColumn HeaderText="City" |
| DataMemberBinding="{Binding City}" /> |
| <grid:GridViewDataColumn HeaderText="State" |
| DataMemberBinding="{Binding StateID}" /> |
| <grid:GridViewDataColumn HeaderText="ZipCode" |
| DataMemberBinding="{Binding ZipCode}" /> |
| </grid:RadGridView.Columns> |
| </grid:RadGridView> |
How can I modify the 2nd column (state) so that when the grid is filtered / grouped I don't see the StateID rather I see a value that has been retrieved from a State collection?
I have tried a number of methods (including DataMemberBinding={Binding StateID, Converter...})
The only solution I that achieves all of my desired results is to actually create a new object (LocationModel) e.g.
| public class LocationModel |
| { |
| public string City { get; set; } |
| public int StateID { get; set; } |
| public string StateName { get; set; } |
| public string ZipCode { get; set; } |
| } |
I can't imagine this is a new conversation, but I have not been successful in finding and answer.