Steps to reproduce: 1. Add a CompositeFilterDescriptor programmatically as it is demonstrated in the following help article: http://docs.telerik.com/devtools/winforms/gridview/filtering/setting-filters-programmatically-(composite-descriptors) 2. Save the layout. 3. Load the layout. Use attached project to reproduce. Workaround: Seth te PropertyName to a valid column name.
To reproduce use the attached project. Workaround: Private Sub gvData_UserAddedRow(sender As Object, e As Telerik.WinControls.UI.GridViewRowEventArgs) Handles gvData.UserAddedRow Dim pi = GetType(GridViewNewRowInfo).GetProperty("MoveToLastRow", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic) pi.SetValue(Me.gvData.MasterView.TableAddNewRow, True, Nothing) End Sub
Hello, we have a RadGridview with a number column and a activated filter for this Grid. If we want to filter data by the value "123" the input in the filter textBox is shown as "321.00" (right-to-left). This is no problem by columns with text values. And at the line for a new data row the input is correct, too.
To reproduce: DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("IsActive", typeof(bool)); dt.Rows.Add(1, "Parent1", false); dt.Rows.Add(2, "Parent2", false); this.radGridView1.DataSource = dt; ((GridViewCheckBoxColumn)this.radGridView1.MasterTemplate.Columns["IsActive"]).EnableHeaderCheckBox = true; this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; DataTable childDataTable = new DataTable(); childDataTable.Columns.Add("Id", typeof(int)); childDataTable.Columns.Add("Title", typeof(string)); childDataTable.Columns.Add("ParentId", typeof(int)); childDataTable.Columns.Add("IsValid", typeof(bool)); childDataTable.Rows.Add(1, "Child 1", 1, false); childDataTable.Rows.Add(2, "Child 1", 1, false); childDataTable.Rows.Add(3, "Child 2", 2, false); childDataTable.Rows.Add(4, "Child 2", 2, false); GridViewTemplate template = new GridViewTemplate(); template.DataSource = childDataTable; ((GridViewCheckBoxColumn)template.Columns["IsValid"]).EnableHeaderCheckBox = true; radGridView1.MasterTemplate.Templates.Add(template); template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate); relation.ChildTemplate = template; relation.RelationName = "MasterDeatial"; relation.ParentColumnNames.Add("Id"); relation.ChildColumnNames.Add("ParentId"); radGridView1.Relations.Add(relation);
To reproduce, add menu item in the filtering context menu and upon click, set it as checked. Note that the filtering cell text should also take the custom menu item text or there should be an approach to set it. Workaround: uncomment the commented code below. protected override void OnLoad(EventArgs e) { base.OnLoad(e); AddGrid(); DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); for (int i = 0; i < 5; i++) { dt.Rows.Add(i, "Item" + i); } dt.Rows.Add(5, null); dt.Rows.Add(6, ""); radGridView1.ShowHeaderCellButtons = true; this.radGridView1.DataSource = dt; this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.EnableFiltering = true; this.radGridView1.EnableCustomFiltering = true; //radGridView1.ContextMenuOpening += radGridView1_ContextMenuOpening; } private void radGridView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { GridFilterCellElement filterCell = e.ContextMenuProvider as GridFilterCellElement; GridViewDataColumn dataCol = (GridViewDataColumn)filterCell.ColumnInfo; if (filterCell != null) { if (filterCell.ColumnInfo.Name == "Name") { RadMenuItem isNullMenuItem = new RadMenuItem(); isNullMenuItem.Click += customMenuItem_Click; isNullMenuItem.Text = "My IsNull"; isNullMenuItem.Tag = filterCell.ColumnInfo.Name; e.ContextMenu.Items.Add(isNullMenuItem); RadMenuItem isNotNullMenuItem = new RadMenuItem(); isNotNullMenuItem.Click += customMenuItem_Click; isNotNullMenuItem.Text = "My IsNotNull"; isNotNullMenuItem.Tag = filterCell.ColumnInfo.Name; e.ContextMenu.Items.Add(isNotNullMenuItem); bool isCustomFilter = (dataCol.FilterDescriptor != null && dataCol.FilterDescriptor is CompositeFilterDescriptor && dataCol.FilterDescriptor.Expression.Contains("NULL")); foreach (RadMenuItem item in e.ContextMenu.Items) { if (item.Text == "Is null" || item.Text == "Is not null") { item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; } //if (isCustomFilter) //{ // item.IsChecked = false; //} } //if (isCustomFilter) //{ // if (((CompositeFilterDescriptor)dataCol.FilterDescriptor).LogicalOperator == FilterLogicalOperator.And) // { // isNotNullMenuItem.IsChecked = true; // } // else // { // isNullMenuItem.IsChecked = true; // } //} } } } private void customMenuItem_Click(object sender, EventArgs e) { RadMenuItem clickedItem = (RadMenuItem)sender; string columnName = clickedItem.Tag.ToString(); radGridView1.Columns[columnName].FilterDescriptor = null; FilterOperator filterOperator = clickedItem.Text.Contains("Not") ? FilterOperator.IsNotEqualTo : FilterOperator.IsEqualTo; FilterLogicalOperator logicalOperator = clickedItem.Text.Contains("Not") ? FilterLogicalOperator.And : FilterLogicalOperator.Or; CompositeFilterDescriptor compositeFilter = new CompositeFilterDescriptor(); compositeFilter.FilterDescriptors.Add(new FilterDescriptor(columnName, filterOperator, "")); compositeFilter.FilterDescriptors.Add(new FilterDescriptor(columnName, filterOperator, null)); compositeFilter.LogicalOperator = logicalOperator; compositeFilter.IsFilterEditor = true; this.radGridView1.FilterDescriptors.Add(compositeFilter); clickedItem.IsChecked = true; }
To reproduce: run the attached sample project. You will notice the result illustrated in the provided screenshot. Although the grid is RTL, the print preview dialog show it in LTR. Workaround: public class CustomGridPrintStyle : GridPrintStyle { protected override BaseGridPrintRenderer InitializePrintRenderer(RadGridView grid) { if (this.PrintRenderer != null) { this.PrintRenderer.PrintCellPaint -= renderer_PrintCellPaint; this.PrintRenderer.PrintCellFormatting -= renderer_PrintCellFormatting; this.PrintRenderer.ChildViewPrinting -= renderer_ChildViewPrinting; } BaseGridPrintRenderer renderer = null; if (grid.ViewDefinition.GetType() == typeof(ColumnGroupsViewDefinition)) { if (!(renderer is ColumnGroupsViewDefinitionPrintRenderer)) { renderer = new CustomColumnGroupsViewDefinitionPrintRenderer(grid); } } else if (grid.ViewDefinition.GetType() == typeof(HtmlViewDefinition)) { if (!(renderer is HtmlViewDefinitionPrintRenderer)) { renderer = new HtmlViewDefinitionPrintRenderer(grid); } } else { if (!(renderer is TableViewDefinitionPrintRenderer)) { renderer = new TableViewDefinitionPrintRenderer(grid); } } renderer.ChildViewPrinting += renderer_ChildViewPrinting; renderer.PrintCellFormatting += renderer_PrintCellFormatting; renderer.PrintCellPaint += renderer_PrintCellPaint; return renderer; } private void renderer_PrintCellPaint(object sender, PrintCellPaintEventArgs e) { this.OnPrintCellPaint(sender, e); } private void renderer_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e) { this.OnPrintCellFormatting(sender, e); } private void renderer_ChildViewPrinting(object sender, ChildViewPrintingEventArgs e) { this.OnChildViewPrinting(sender, e); } } public class CustomColumnGroupsViewDefinitionPrintRenderer : ColumnGroupsViewDefinitionPrintRenderer { public CustomColumnGroupsViewDefinitionPrintRenderer(RadGridView grid) : base(grid) { } protected override void PrintRow(GridViewRowInfo row, ColumnGroupRowLayout rowLayout, GridPrintSettings settings, int currentX, int currentY, Graphics graphics) { float scrollableColumnsOffset = 0f; float rightPinnedColumnsOffset = 0f; foreach (GridViewColumn col in rowLayout.RenderColumns) { if (col is GridViewRowHeaderColumn || col is GridViewIndentColumn) { continue; } float height = rowLayout.GetRowHeight(row); RectangleF cellBounds = rowLayout.GetCorrectedColumnBounds(row, col, this.GridView.RightToLeft == RightToLeft.Yes, new RectangleF(0f, 0f, rowLayout.DesiredSize.Width, height)); if (cellBounds == RectangleF.Empty) { continue; } if (col.PinPosition == PinnedColumnPosition.Left) { if (scrollableColumnsOffset < cellBounds.Right + rowLayout.Owner.CellSpacing) { scrollableColumnsOffset = cellBounds.Right + rowLayout.Owner.CellSpacing; rightPinnedColumnsOffset = scrollableColumnsOffset; } } else if (col.PinPosition == PinnedColumnPosition.None) { if (rightPinnedColumnsOffset < scrollableColumnsOffset + cellBounds.Right + rowLayout.Owner.CellSpacing) { rightPinnedColumnsOffset = scrollableColumnsOffset + cellBounds.Right + rowLayout.Owner.CellSpacing; } cellBounds.X += scrollableColumnsOffset; } else { cellBounds.X += rightPinnedColumnsOffset; } cellBounds.Offset(currentX, currentY); GridViewCellInfo cell; CellPrintElement printCell; if (row is GridViewTableHeaderRowInfo) { cell = this.GridView.MasterView.TableHeaderRow.Cells[col.Name]; printCell = this.CreateHeaderCellPrintElement(col); if (printCell.Font != settings.HeaderCellFont) { if (settings.HeaderCellFont != null) { printCell.Font = settings.HeaderCellFont; } else { settings.HeaderCellFont = printCell.Font; } } } else if (row is GridViewSummaryRowInfo) { GridViewSummaryRowInfo rowInfo = row as GridViewSummaryRowInfo; cell = rowInfo.Cells[col.Name]; if (cell == null) { continue; } printCell = this.CreateSummaryCellPrintElement(cell); if (printCell.Font != settings.SummaryCellFont) { if (settings.SummaryCellFont != null) { printCell.Font = settings.SummaryCellFont; } else { settings.SummaryCellFont = printCell.Font; } } } else { cell = row.Cells[col.Name]; if (cell == null) { continue; } if (col is GridViewImageColumn) { printCell = this.CreateImageCellPrintElement(cell); } else { printCell = this.CreateDataCellPrintElement(cell); if (printCell.Font != settings.CellFont) { if (settings.CellFont != null) { printCell.Font = settings.CellFont; } else { settings.CellFont = printCell.Font; } } } } printCell.TextPadding = this.GridView.PrintStyle.CellPadding; printCell.RightToLeft = this.GridView.RightToLeft == RightToLeft.Yes; Rectangle rect = new Rectangle((int)cellBounds.X, (int)cellBounds.Y, (int)cellBounds.Width, (int)cellBounds.Height); PrintCellFormattingEventArgs formattEventArgs = new PrintCellFormattingEventArgs(row, col, printCell); this.OnPrintCellFormatting(formattEventArgs); formattEventArgs.PrintCell.Paint(graphics, rect); PrintCellPaintEventArgs paintEventArgs = new PrintCellPaintEventArgs(graphics, row, col, rect); this.OnPrintCellPaint(paintEventArgs); } } } private void radButton1_Click(object sender, EventArgs e) { CustomGridPrintStyle style = new CustomGridPrintStyle(); this.radGridView1.PrintStyle = style; RadPrintDocument printDoc = new RadPrintDocument(); printDoc.Landscape = true; printDoc.RightHeader = "Right Header"; printDoc.HeaderHeight = 100; printDoc.AssociatedObject = this.radGridView1; RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(printDoc); dialog.Size = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width - 200, Screen.PrimaryScreen.Bounds.Height - 200); dialog.SetZoom(0.80); dialog.ShowDialog(); }
There should be a way for users to determine if a row passes a certain filter criteria without that affecting any data operations.
The GridViewCheckBoxColumn.EditMode property controls when the value of the editor will be submitted to the cell. By default, the value is OnValidate and the value will be submitted only when the current cell changes, the grid looses focus or the active editor is closed by pressing Enter. If you set the EditMode property to OnValueChange it will submit the value immediately after the editor value changes. Please refer to the attached gif files illustrating the difference between the two modes. To reproduce: if you set the GridViewCheckBoxColumn.EnableHeaderCheckBox property to true, the cell value is always submitted immediately after toggle/untoggle the checkbox without considering that EditMode.OnValidate is used.
How to reproduce: public partial class Form1 : Form { public Form1() { InitializeComponent(); GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn(); decimalColumn.Name = "DecimalColumn"; decimalColumn.HeaderText = "DecimalColumn"; this.radGridView1.MasterTemplate.Columns.Add(decimalColumn); GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn(); textBoxColumn.Name = "TextBoxColumn"; textBoxColumn.HeaderText = "TextBoxColumn"; this.radGridView1.MasterTemplate.Columns.Add(textBoxColumn); GridViewDateTimeColumn dateTimeColumn = new GridViewDateTimeColumn(); dateTimeColumn.Name = "DateTimeColumn"; dateTimeColumn.HeaderText = "DateTimeColumn"; this.radGridView1.MasterTemplate.Columns.Add(dateTimeColumn); } } Workaround: this.radGridView1.MasterView.TableAddNewRow.MinHeight = 30;
When the EnableHeaderCheckBox property is set to true, whenever the checkbox is clicked in the new row, a new row is actually added to the grid before any other modifications are made. This can be replicated in the attached sample project. Run it and click the checkbox in the new row several times. Multiple rows are added. Workaround: cancel the RadGridView.UserAddingRow until all the required fields are filled.
To reproduce: public Form1() { InitializeComponent(); DataTable dt = new DataTable(); dt.Columns.Add("Id"); dt.Columns.Add("Name"); for (int i = 0; i < 1; i++) { dt.Rows.Add(i, "Item"); } this.radGridView1.DataSource = dt; this.radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect; this.radGridView1.ClipboardCopyMode = Telerik.WinControls.UI.GridViewClipboardCopyMode.EnableAlwaysIncludeHeaderText; this.radGridView1.MultiSelect = true; } private void button1_Click(object sender, EventArgs e) { this.radGridView1.SelectAll(); this.radGridView1.Copy(); } If you click the button, you will notice that only one cell is copied. However, if you add 2 and more rows, the whole grid content will be copied to the clipboard. Workaround: use the BeginRowCopy/EndRowCopy methods. private void button1_Click(object sender, EventArgs e) { this.radGridView1.SelectAll(); this.radGridView1.MasterTemplate.BeginRowCopy(); this.radGridView1.Copy(); this.radGridView1.MasterTemplate.EndRowCopy(); }
To reproduce: - Add several columns including combo-box columns to a grid. - Add one row and upon a button click, change the data source of the combo column. Workaround: Seth the following field to null prior changing the data source: GetType(GridViewComboBoxColumn).GetField("nullBoundItem", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).SetValue(combo, Nothing) combo.DataSource = dt
To reproduce: add a RadGridView and a RadButton on the form. Use the following code snippet: public RadForm1() { InitializeComponent(); this.radGridView1.Columns.Add("Col1"); this.radGridView1.Columns.Add("Col2"); for (int i = 0; i < 5; i++) { this.radGridView1.Rows.Add(i, "Item" + i); } this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.RowValidating += radGridView1_RowValidating; this.radGridView1.UserAddingRow += radGridView1_UserAddingRow; } private void radGridView1_UserAddingRow(object sender, Telerik.WinControls.UI.GridViewRowCancelEventArgs e) { e.Cancel = true; } private void radGridView1_RowValidating(object sender, Telerik.WinControls.UI.RowValidatingEventArgs e) { if (e.Row.IsModified && e.Row is GridViewDataRowInfo) { e.Cancel = true; } } private void radButton1_Click(object sender, EventArgs e) { RadMessageBox.Show("Clicked"); } 1. Select a data cell and activate the editor. Enter some new value and click the button. The Click event is fired. 2. Select the new row and activate the editor. Enter some value and click the button. The Click event is NOT fired. Workaround: use the CellValidating event instead.
To reproduce: Sub New() InitializeComponent() Dim dt1 As New DataTable dt1.Columns.Add("Id", GetType(Integer)) dt1.Columns.Add("Name", GetType(String)) For index = 1 To 20 dt1.Rows.Add(index, "Parent" & index) Next Me.RadGridView1.MasterTemplate.DataSource = dt1 Me.RadGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill Dim dt2 As New DataTable dt2.Columns.Add("Id", GetType(Integer)) dt2.Columns.Add("Name", GetType(String)) dt2.Columns.Add("ParentId", GetType(Integer)) Dim dt3 As New DataTable dt3.Columns.Add("Id", GetType(Integer)) dt3.Columns.Add("Name", GetType(String)) dt3.Columns.Add("ParentId", GetType(Integer)) For index = 1 To 20 If index Mod 2 = 0 Then dt2.Rows.Add(index, "Child1." & index, index) If index Mod 4 = 0 Then dt3.Rows.Add(index, "Child2." & index, index) End If ElseIf index Mod 3 = 0 Then dt3.Rows.Add(index, "Child2." & index, index) Else dt3.Rows.Add(index, "Child2." & index, index) End If Next Dim template As New GridViewTemplate() template.DataSource = dt2 template.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill RadGridView1.MasterTemplate.Templates.Add(template) Dim relation As New GridViewRelation(RadGridView1.MasterTemplate) relation.ChildTemplate = template relation.RelationName = "FirstChild" relation.ParentColumnNames.Add("Id") relation.ChildColumnNames.Add("ParentId") RadGridView1.Relations.Add(relation) Dim template2 As New GridViewTemplate() template2.DataSource = dt3 template2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill RadGridView1.MasterTemplate.Templates.Add(template2) Dim relation2 As New GridViewRelation(RadGridView1.MasterTemplate) relation2.ChildTemplate = template2 relation2.RelationName = "SecondChild" relation2.ParentColumnNames.Add("Id") relation2.ChildColumnNames.Add("ParentId") RadGridView1.Relations.Add(relation2) AddHandler Me.RadGridView1.ChildViewExpanding, AddressOf ChildViewExpanding End Sub Private Sub RadGridView1_ViewCellFormatting(sender As Object, e As Telerik.WinControls.UI.CellFormattingEventArgs) _ Handles RadGridView1.ViewCellFormatting Dim cell As GridDetailViewCellElement = TryCast(e.CellElement, GridDetailViewCellElement) Dim expanderCell As GridGroupExpanderCellElement = TryCast(e.CellElement, GridGroupExpanderCellElement) If expanderCell IsNot Nothing AndAlso TypeOf e.CellElement.RowElement Is GridDataRowElement Then Dim hierarchyRow As GridViewHierarchyRowInfo = DirectCast(expanderCell.RowInfo, GridViewHierarchyRowInfo) If Not IsExpandable(hierarchyRow) Then expanderCell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Hidden Else expanderCell.Expander.Visibility = Telerik.WinControls.ElementVisibility.Visible End If ElseIf cell IsNot Nothing Then Dim hierarchyRow As GridViewHierarchyRowInfo = DirectCast(DirectCast(cell.RowInfo, GridViewDetailsRowInfo).Owner, _ GridViewHierarchyRowInfo) For i As Integer = 0 To cell.PageViewElement.Items.Count - 1 Dim item As RadPageViewItem = cell.PageViewElement.Items(i) Dim viewInfo As GridViewInfo = hierarchyRow.Views(i) item.Text = "Child Template " & i If viewInfo.ChildRows.Count = 0 Then If i = 0 AndAlso i < cell.PageViewElement.Items.Count - 1 Then cell.PageViewElement.Items(i + 1).IsSelected = True End If item.Visibility = Telerik.WinControls.ElementVisibility.Hidden Else item.Visibility = Telerik.WinControls.ElementVisibility.Visible End If Next End If End Sub Private Function IsExpandable(hierarchyRow As GridViewHierarchyRowInfo) As Boolean For Each view As GridViewInfo In hierarchyRow.Views If view.ChildRows.Count > 0 Then Return True End If Next Return False End Function Workaround: AddHandler Me.RadGridView1.ChildViewExpanding, AddressOf RadGridView1_ChildViewExpanding AddHandler Me.RadGridView1.MouseDown, AddressOf RadGridView_MouseDown Private Sub RadGridView1_ChildViewExpanding(sender As Object, e As ChildViewExpandingEventArgs) If lastClicked IsNot Nothing AndAlso e.ParentRow.Equals(lastClicked) Then e.Cancel = False Else e.Cancel = True End If End Sub Dim lastClicked As GridViewRowInfo Private Sub RadGridView_MouseDown(sender As Object, e As MouseEventArgs) Dim expander As GridExpanderItem = TryCast(Me.RadGridView1.ElementTree.GetElementAtPoint(e.Location), GridExpanderItem) If expander IsNot Nothing Then lastClicked = DirectCast(expander.Parent, GridGroupExpanderCellElement).RowInfo End If End Sub
To reproduce: - Add GridViewTextBoxColumn and set the MaxLength property. - Paste in data row while the is not in edit mode. Workaround: private void RadGridView1_Pasting(object sender, Telerik.WinControls.UI.GridViewClipboardEventArgs e) { if (radGridView1.CurrentColumn.Name == "column1") { GridViewTextBoxColumn col = new GridViewTextBoxColumn(); var lenght = col.MaxLength; if (Clipboard.ContainsData(DataFormats.Text)) { e.Cancel = true; string data = Clipboard.GetData(DataFormats.Text).ToString(); radGridView1.CurrentCell.Value = data.Substring(0, lenght); } } }
Steps to reproduce: 1. Add a CompositeFilterDescriptor programmatically as it is demonstrated in the following help article: http://docs.telerik.com/devtools/winforms/gridview/filtering/setting-filters-programmatically-(composite-descriptors) 2. Save the layout. 3. Load the layout. Workaround: specify the PropertyName property for the CompositeFilterDescriptor.
To reproduce: Sub New() InitializeComponent() Dim dt As New DataTable dt.Columns.Add("Id", GetType(Integer)) dt.Columns.Add("Name", GetType(String)) dt.Columns.Add("Description", GetType(String)) For index = 1 To 5 dt.Rows.Add(index, "Item" & index, "Description" & index) Next Me.RadGridView1.DataSource = dt Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill AddHandler Me.RadGridView1.UserAddingRow, AddressOf UserAddingRow End Sub Private Sub UserAddingRow(sender As Object, e As Telerik.WinControls.UI.GridViewRowCancelEventArgs) Me.RadGridView1.MasterView.TableAddNewRow.ErrorText = "" If String.IsNullOrEmpty(e.Rows(0).Cells(0).Value) Then e.Cancel = True Me.RadGridView1.MasterView.TableAddNewRow.ErrorText = "Empty value is not allowed!" End If End Sub 1. Click the new row and enter a value in the last cell. 2. Click outside the new row, e.g. click on a data row. The UserAddingRow event is canceled and the new row remains current. 3. Click a data row again without any modification on the new row. The new row is not current anymore. 4. However, you perform step 1and 2 but instead of clicking a data row, the user clicks a header cell, the new row is not current from the first time. It is necessary to forbid the user to exit the new row until the validation passes or the new row is canceled by pressing Enter. Workaround: use the CellValidating/RowValidating event for validating.
Consider the case where there are many child views and you want to export only the ones that actually contain data. Currently, you can either export only one view or all. One should be able to pass all the views in the ChildViewExporting event.
Workaround: create a custom GridDetailViewCellElement Public Class Form1 Sub New() InitializeComponent() AddHandler dgvPatients.CreateCell, AddressOf dgvPatients_CreateCell End Sub Private Sub dgvPatients_CreateCell(sender As Object, e As GridViewCreateCellEventArgs) If e.CellType = GetType(GridDetailViewCellElement) Then e.CellElement = New MyGridDetailViewCellElement(e.Column, e.Row) End If End Sub End Class Public Class MyGridDetailViewCellElement Inherits GridDetailViewCellElement Sub New(column As GridViewColumn, rowElement As GridRowElement) MyBase.New(column, rowElement) End Sub Public Overrides Sub UpdateTabItemsVisibility() If Me.DetailsRow Is Nothing Then Return End If MyBase.UpdateTabItemsVisibility() End Sub End Class