Sign In|Join
Home/Silverlight.NET Forums/Silverlight Controls and Silverlight Toolkit/Hiding a Row in DataGrid/Re: Hiding a Row in DataGrid
Member
4 Points
15 Posts
Apr 21, 2011 06:17 PM | LINK
This also works: private void datagrid_LoadingRow(object sender, DataGridRowEventArgs e) { if (((DataGrid)sender).ItemsSource != null) { Binding newBinding = new Binding("IsMarkedForHide"); newBinding.Mode = BindingMode.TwoWay; e.Row.SetBinding(DataGridRow.VisibilityProperty, newBinding); } } private void datagrid_UnloadingRow(object sender, DataGridRowEventArgs e) { if (((DataGrid)sender).ItemsSource != null) { e.Row.DataContext = null; } }
jon.borchardt
Member
4 Points
15 Posts
Re: Hiding a Row in DataGrid
Apr 21, 2011 06:17 PM | LINK