or
var grids = grid1.ChildrenOfType<RadGridView>();var rows = grid1.ChildrenOfType<GridViewRow>();[MediatorMessageSink(MediatorConstants.Cashbook_ChildStatementLineFocus)] private void Cashbook_ChildStatementLineFocusMessageSink(int currentRowIndex) { if (grid1.ItemsSource != null) { grid1.ExpandHierarchyItem(this.grid1.Items[currentRowIndex]); Dispatcher.BeginInvoke((Action)delegate { var grids = grid1.ChildrenOfType<RadGridView>(); var rows = grid1.ChildrenOfType<GridViewRow>(); foreach (var row in rows) { if (grid1.SelectedItem == this.grid1.Items[currentRowIndex]) { var child = row.ChildrenOfType<RadGridView>().FirstOrDefault(); child.SelectedItem = child.Items[0]; var column = child.Columns[1]; var cellToEdit = new GridViewCellInfo(child.SelectedItem, column, child); child.CurrentCellInfo = cellToEdit; child.BeginEdit(); } } }); //RadGridView childGrid = this.grid1.ChildrenOfType<RadGridView>().FirstOrDefault(x => ((DOFinBankStatementTran)x.ParentRow.DataContext).BankStatementTranID == ((DOFinBankStatementTran)this.grid1.CurrentItem).BankStatementTranID); //if (childGrid != null) //{ // var item = childGrid.Items[0]; // var column = this.grid1.Columns[1]; // var cellToEdit = new GridViewCellInfo(item, column, childGrid); // childGrid.CurrentCellInfo = cellToEdit; // childGrid.BeginEdit(); //} } }private void ExecuteDissectionCommand() { try { DOFinBankStatementTran currentLine = SelectedStatementLine; if (currentLine == StatementLinesSource.Last()) { AddNewLineCommand.Execute(true); } if (currentLine.Children == null) { currentLine.Children = new List<DOFinBankStatementTran>(); DOFinBankStatementTran line = CurrentClientHelper.ClientFinancial.CreateBankStatementTran(currentLine.GLBankAccount); line.ParentStatementTranID = currentLine.BankStatementTranID; line.GLBankAccountID = currentLine.GLBankAccountID; line.GLBankAccount = currentLine.GLBankAccount; line.HasChildren = false; line.ImageForIsEditable = currentLine.ImageForIsEditable; line.IsActive = true; line.IsDeleted = false; line.IsPosted = false; line.IsReconciled = false; currentLine.Children.Add(line); currentLine.HasChildren = true; } int i = StatementLinesSource.IndexOf(currentLine); StatementLinesSource.RemoveAt(i); StatementLinesSource.Insert(i, currentLine); Mediator.Instance.NotifyColleagues<int>(MediatorConstants.Cashbook_ChildStatementLineFocus, i); } catch (Exception ex) { //check if exception type is global exception and throw ExceptionHelper.CheckExceptionType(ex, typeof(GlobalException)); _messageBoxService.ShowError("DissectionCommand Error:"+ex.Message); CurrentClientHelper.ClientAudit.LogException(ex, EventCategory.Client); } }<telerik:RadGridView x:Name="grid1" Grid.Row="1" Grid.Column="0" ShowGroupPanel="False" AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed" IsReadOnly="False" CanUserInsertRows="False" EditTriggers="CellClick" RowLoaded="grid1_RowLoaded" ItemsSource="{Binding StatementLinesSource,Mode=TwoWay}" SelectedItem="{Binding SelectedStatementLine, Mode=TwoWay}" BeginningEdit="grid1_BeginningEdit" IsSynchronizedWithCurrentItem="False" aps:SingleEventCommand.RoutedEventName="CellEditEnded" aps:SingleEventCommand.CommandParameter="{Binding ElementName=grid1, Path=CurrentCell.Column.UniqueName}" aps:SingleEventCommand.TheCommandToRun="{Binding CellEditEndedCommand}" abs:RadGridViewKeyboardBehaviour.IsEnabled="True" abs:RadGridViewKeyboardBehaviour.EnterDirection="MoveNext" ScrollViewer.HorizontalScrollBarVisibility="Auto" EnableColumnVirtualization="True" EnableRowVirtualization="True" UseLayoutRounding="False" ><telerik:RadGridView x:Name="gridChildren" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding Children}" ShowGroupPanel="False" CanUserInsertRows="True" SelectionChanged="gridChildren_SelectionChanged" RowEditEnded="gridChildren_RowEditEnded" RowValidating="gridChildren_RowValidating" RowLoaded="gridChildren_RowLoaded" abs:RadGridViewKeyboardBehaviour.IsEnabled="True" abs:RadGridViewKeyboardBehaviour.EnterDirection="MoveNext" EditTriggers="CellClick" IsTabStop="True" DataLoaded="gridChildren_DataLoaded" >
Is it possible to change this behavior and make tab content static?
#ExternalSource("..\..\..\Infrastructure\ResultsWindow.xaml",18) <System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")> _ Friend WithEvents datagrid As Telerik.Windows.Controls.RadGridView #End ExternalSource <telerik:RadCalendar Grid.Row="1" Margin="6,6,6,6" x:Name="calendar" IsTodayHighlighted="False" telerikControls:StyleManager.Theme="Vista" DayTemplateSelector="{StaticResource templateSelector}" Columns="4" Rows="3" ViewsHeaderVisibility="Visible" FirstDayOfWeek="Monday" HeaderVisibility="Visible" ContextMenuOpening="calendar_ContextMenuOpening"> <telerik:RadContextMenu.ContextMenu> <telerik:RadContextMenu x:Name="cmCalendar" Opened="ContextMenuCalendar_Opened" telerikControls:StyleManager.Theme="Vista"> <telerik:RadMenuItem x:Name="miHoliday" Header="{x:Static local:CentralCalendarWindowGlossary.miHoliday_Header}" Click="MenuItemHoliday_Click" IsCheckable="True" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}" /> <telerik:RadMenuItem x:Name="miNoDistribution" Header="{x:Static local:CentralCalendarWindowGlossary.miNoDistribution_Header}" IsCheckable="True" Click="MenuItemNoDistribution_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}" /> <telerik:RadMenuItem IsSeparator="True" /> <telerik:RadMenuItem x:Name="miSiteDistribution" Header="{x:Static local:CentralCalendarWindowGlossary.miSiteDistribution_Header}" Click="MenuItemSiteDistribution_Click" ToolTipService.ShowOnDisabled="True" ToolTipService.IsEnabled="{Binding Path=IsEnabled}" ToolTip="{DynamicResource toolTipDefault}"> <telerik:RadMenuItem.Icon> <Image Source="/AN.Planner.Administrator;component/Images/SiteDetailsViewSmall.ico" /> </telerik:RadMenuItem.Icon> </telerik:RadMenuItem> </telerik:RadContextMenu> </telerik:RadContextMenu.ContextMenu> </telerik:RadCalendar>