Home Forums WPF controls Xceed DataGrid for WPF Styling the Grid

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #21863 |

    Is it possible to style the grid as i attempted to do below:

    <Style TargetType=”{x:Type xcdg:DataGridControl}”>
    <Setter Property=”View”>
    <Setter.Value>
    <xcdg:TableView>
    <xcdg:TableView.FixedHeaders>
    <DataTemplate>
    <xcdg:ColumnManagerRow />
    </DataTemplate>
    </xcdg:TableView.FixedHeaders>
    <xcdg:TableView.Footers>
    <DataTemplate>
    <xcdg:InsertionRow />
    </DataTemplate>
    </xcdg:TableView.Footers>
    </xcdg:TableView>
    </Setter.Value>
    </Setter>
    </Style>

    This gives an error. What I’d really like to do is create a reusable style for a grid that has no groupcontrol and has an insertionrow in the footer. Is this possible in markup?

    Imported from legacy forums. Posted by Tolulope (had 3279 views)

    User (Old forums)
    Member
    Post count: 23064

    Unfortunately, it is not possible to assign a View to the property Setter.Value. Moreover, it is not possible to assign the same instance of a View to more than 1 DataGridControl.

    We are well aware that these limitations are not fun, and we are trying to remove them.

    In the meantime, if you have lots of DataGrids in your application and you want all of them to have the same View, I suggest you derive from DataGridControl and configure the View accordingly in the derived class.

    Imported from legacy forums. Posted by Pascal (had 212 views)

    User (Old forums)
    Member
    Post count: 23064

    OK Thanks a lot.

    I guess I’ll just do it one grid at a time.

    Just to be sure, there’s no way to remove the groupcontrol using markup?

    Thanks

    Imported from legacy forums. Posted by Tolulope (had 238 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes, you can remove the GroupByControl in markup! See this thread (anwser #3, code snippet #2):

    http://forums.xceed.com/forums/ShowPost.aspx?PostID=5775

    Imported from legacy forums. Posted by Pascal (had 4585 views)

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