This question is locked. New answers and comments are not allowed.
Hello,
I am using self referencing functionality in RadGridView. I need to hide parent grid items that are related to other items within the grid..
for example:
Row1
Row3
Row2
Row3 <-- I don't want this row to be present in parent
I am currently following the example and attaching RowLoaded event where I am changing the IsExpandable. I also tried to change Visibility or rows I would like to hide but this will leave white spots in the grid. I am thinking about changing row Heigth to 0. Is this the right approach or there is a better one?
Thanks,
Nick
I am using self referencing functionality in RadGridView. I need to hide parent grid items that are related to other items within the grid..
for example:
Row1
Row3
Row2
Row3 <-- I don't want this row to be present in parent
I am currently following the example and attaching RowLoaded event where I am changing the IsExpandable. I also tried to change Visibility or rows I would like to hide but this will leave white spots in the grid. I am thinking about changing row Heigth to 0. Is this the right approach or there is a better one?
Thanks,
Nick
private void dataGrid_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e) { GridViewRow row = e.Row as GridViewRow; DataGridRowData item = e.DataElement as DataGridRowData; if (row != null && item != null) { if (!item.HasParent) { row.IsExpandable = true; } else { row.IsExpandable = false; // row. Visibility = Visibility.Collapsed <-- will leave empty spots in the grid } } }