Home Forums WPF controls Xceed DataGrid for WPF how to access a control in the column header?

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

    Hi folks…. I’m trying to access a control I’ve put in the column header, and don’t know how to get to it.

    Here’s the scenario: I’ve subclassed the DataGridControl into my own class, and am trying to provide my own filtering functionality. I created a custom control, called FilterControl (template is a ComboBox and all event handlers for it are included in the FilterControl class). When I’m manually building up the columns, I’m replacing each column’s TitleTemplate with my own DataTemplate (see below)

    <DataTemplate x:Name=”colTitleTemplate” >
    <StackPanel Orientation=”Vertical”>
    <TextBlock Text=”” />
    <ns:FilterControl Margin=”0,5,0,0″ />
    </StackPanel>
    </DataTemplate>

    At runtime, I’m reading the DataTemplate in as XML, and filling in the Text field with the appropriate binding for the column’s title. That’s all working fine.

    But later on, when it becomes time to apply the filter criteria specified in each column, how do I get to the FilterControl in order to find out what’s in there?? I can’t figure out how to access the ColumnManagerRow to get at the cells, or if there’s another way to do it.

    Any suggestions will be greatly appreciated. Thanks!!
    -Amy-

    Imported from legacy forums. Posted by Amy (had 2071 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi can u please tell me how to acces this Datatemplate into any Header cell of the DataGrid. As i need to add a CheckBox into a Header.

    Imported from legacy forums. Posted by asdf (had 2842 views)

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