Home Forums WPF controls Xceed DataGrid for WPF CellContentTemplate

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #21936 |


    The DataGridControl works, but specifying a CellContentTemplate on columns is really hard.

    Why is this working different then the ListBox, ListView and other WPF controls ?

    Problem is that the DataContext of the DataTemplate equals the value of the FieldName specified on then column.

    Why not set the DataContext to the corresponding DataItem (DataRowView) of the Row ?

    I tried to override the Xceed DataGridControl and Column but noticed that many methods and properties are hidden or not overridable.

    Imported from legacy forums. Posted by Krijn (had 2763 views)

    User (Old forums)
    Post count: 23064

    I saw that too, and got round it by setting DisplayMemberBinding=”{Binding}”

    Also it doesn’t seem right to me…

    Imported from legacy forums. Posted by nmosafi (had 299 views)

    Xceed Support
    Post count: 5658

    The major difference between the ListBox/ListView and the DataGridControl is that this last was designed from the start to work with Tabular data while the ListBox does not handle it and the ListView is an adaptation of the ListBox, made to display columns based on the data item…

    The concept behind WPF for displaying content is that a DataTemplate is used to customize the way a single data object is displayed, under that assumption, and using the tabular data point of view, we figured that we would expose each of the column`s value independently, therefore making simpler the creation of a single DataTemplate generic for a DataType instead of a DataTemplate applied to the context of a complex data item.

    In that regard, we think we are in fact sticking closer to the WPF philosophy…

    Concerning the hidden and locked-up methods… We tried building an Object Model that would possess a good amount of extendability qualities. We did however try to protect most of the principles that we though would need to be preserved to maintain the core features of the DataGridControl.

    Also, we went with the strategy to start with a more compact public interface. With time, as the scenarios are evaluated, we thought it was better to extend the public interface rather than open up everything at first and cause breaking changes when a scenario is proven dangerous.

    We are opened to discussion and ready to help concerning both the feature set and the API, so feel free to post whatever concerns you have…

    Imported from legacy forums. Posted by Marcus [Xceed] (had 4132 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.