This question is locked. New answers and comments are not allowed.
My RowDetailsTemplate contains a RadGridView, when ever a row is added by my viewModel into the _CalendarDateList RadGridView
the RowDetailsTemplate should be in expanded mode showing the newly added row in RadGridView
for that I have implemented the following code -
But It is not getting expanded, am I missing something in the RowDetailsTemplate in XAML or somewhere else? I have debugged my entire code and it sets the DetailsVisibility to Visible but still it is not getting expanded.
I also tried with another alternate solution, i.e. by retrieving the row through following looping -
Still the RowDetailsTemplate is not getting expanded.
the RowDetailsTemplate should be in expanded mode showing the newly added row in RadGridView
| <telerikData:RadGridView.RowDetailsTemplate> |
| <DataTemplate> |
| <StackPanel Background="#ffe8e7e3"> |
| <Border Margin="33, 0, 0, 0" BorderBrush="Transparent" BorderThickness="0"> |
| <telerikData:RadGridView Name="_CalendarDateList" ShowGroupPanel="False" |
| telerikGridViewFilter:GridViewFilterRow.IsEnabled="True" BorderThickness="2" BorderBrush="#A6A6A6" |
| ItemsSource="{Binding CalendarDateData}" SelectionMode="Single" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" AutoGenerateColumns="False" |
| CanUserResizeColumns="False" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed" Background="White"> |
for that I have implemented the following code -
| private void calendarViewModel_AddIndividualCalendarCalendarDateCompleted(object sender, EventArgs e) |
| { |
| _CalendarViewModel.AddIndividualCalendarCalendarDateCompleted -= new EventHandler<EventArgs>(calendarViewModel_AddIndividualCalendarCalendarDateCompleted); |
| CalendarModel calModel = sender as CalendarModel; |
| if (calModel != null) |
| { |
| GridViewRow row = _CalendarList.ItemContainerGenerator.ContainerFromItem(calModel) as GridViewRow; |
| if (row != null) row.DetailsVisibility = Visibility.Visible; |
| } |
| } |
But It is not getting expanded, am I missing something in the RowDetailsTemplate in XAML or somewhere else? I have debugged my entire code and it sets the DetailsVisibility to Visible but still it is not getting expanded.
I also tried with another alternate solution, i.e. by retrieving the row through following looping -
| private void calendarViewModel_AddIndividualCalendarCalendarDateCompleted(object sender, EventArgs e) |
| { |
| _CalendarViewModel.AddIndividualCalendarCalendarDateCompleted -= new EventHandler<EventArgs>(calendarViewModel_AddIndividualCalendarCalendarDateCompleted); |
| CalendarModel calModel = sender as CalendarModel; |
| if (calModel != null) |
| { |
| IList<GridViewRow> gridViewRows = this._CalendarList.ChildrenOfType<GridViewRow>(); |
| foreach (GridViewRow gvr in gridViewRows) |
| { |
| CalendarModel calendarModelTemp = gvr.DataContext as CalendarModel; |
| if (calendarModelTemp != null |
| && calModel != null |
| && calendarModelTemp.BusinessCalendarData.Id == calModel.BusinessCalendarData.Id) |
| { |
| gvr.DetailsVisibility = Visibility.Visible; |
| break; |
| } |
| } |
| } |
| } |
Still the RowDetailsTemplate is not getting expanded.