Hello
I want to filter my child grid
when I watch the DateView dv it is filtered
but in the child grid I still see all the rows and not only the filtered rows
this is my code
Thanks
By the way, I'm still waiting for an answer about second child hierarchy.
I want to filter my child grid
when I watch the DateView dv it is filtered
but in the child grid I still see all the rows and not only the filtered rows
this is my code
private void OnChildGridLoaded(object sender, RoutedEventArgs e) |
{ |
// Pull data from the detail table based on the relation. |
var dataRowView = (DataRowView)((RadGridView)sender).ParentRow.DataContext; |
var ds = dataRowView.DataView.Table.DataSet; |
var childData = dataRowView.CreateChildView(ds.Relations["BudgetRelation"]); |
if (((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id != 0) |
{ |
dv = new DataView(childData.ToTable(), "ActivityTypeID=" + ((ComboBoxValues.ComboValues)cmbActivityType.SelectedValue).Id, "", DataViewRowState.CurrentRows); |
((RadGridView)sender).DataContext = dv; |
} |
else |
((RadGridView)sender).DataContext = childData; |
((GridViewComboBoxColumn)((RadGridView)sender).Columns["ActivityTypeName"]).ItemsSource = ComboBoxValues.GetComboValues(dtActivityType); |
} |
Thanks
By the way, I'm still waiting for an answer about second child hierarchy.