Please use the attached sample project.
Hi There,
This call is only a nice to have, it is not critical at all. It is just a slight annoyance when building the Grid's columns - especially when there are many columns to adjust. My workflow is usually as follow.
Add all the columns needed, then after that I will run through all the columns and want to set the widths. But my speed is broken because I can't tab between the 3 width properties: Width, Min Width, Max Width. I have to click to put focus the the next value.
If possible, please can you correct the tab indexes?
Thank you
Kind Regards
Ben
PS. You may close this ticket immediately - this is only a request.
Please run the attached sample project. The row's height in the print document is not adjusted according to the column's width in the print page.
Workaround:
Usually for such cases it is convenient to increase the column's width in order to reduce its height and thus it would be able to fit the print page's height. In addition to adjusting the column's width, feel free to use multi-page printing:
To reproduce: please open the attached sample project and follow the steps illustrated in the attached gif file. Workaround: 1. You still can scroll while dragging a row by using the mouse wheel. 2. Use the grid in unbound mode and set the AllowRowReorder property to true instead of using a custom RadDragDropService. 3. Use a custom drag and drop service: public class CustomDragDropService : RadGridViewDragDropService { public CustomDragDropService(RadGridViewElement gridViewElement) : base(gridViewElement) { } public override string Name { get { return typeof(RadGridViewDragDropService).Name; } } protected override void HandleMouseMove(System.Drawing.Point mousePosition) { base.HandleMouseMove(mousePosition); System.Drawing.Point location = this.GridViewElement.ElementTree.Control.PointToClient(Control.MousePosition); GridTableElement tableElement = this.GetTableElementAtPoint(location); ISupportDrag supportDrag = this.Context as ISupportDrag; object dataContext = supportDrag.GetDataContext(); if (this.AllowAutoScrollRowsWhileDragging && dataContext == null) { ScrollRows(tableElement, location); } } private void ScrollRows(GridTableElement tableElement, System.Drawing.Point location) { ScrollableRowsContainerElement scrollableRows = tableElement.ViewElement.ScrollableRows; RadScrollBarElement vScrollbar = GetVeritcalScrollbar(tableElement); System.Drawing.Rectangle containerBounds = scrollableRows.ControlBoundingRectangle; if (containerBounds.Contains(location) || location.X < containerBounds.X || location.X > containerBounds.Right) { return; } int delta = 0; if (location.Y > containerBounds.Bottom) { delta = location.Y - containerBounds.Bottom; } else if (location.Y < containerBounds.Y) { delta = location.Y - containerBounds.Y; } if (delta != 0 && vScrollbar.Visibility == ElementVisibility.Visible) { vScrollbar.Value = ClampValue(vScrollbar.Value + delta, vScrollbar.Minimum, vScrollbar.Maximum - vScrollbar.LargeChange + 1); } } private int ClampValue(int value, int minimum, int maximum) { if (value < minimum) { return minimum; } if (maximum > 0 && value > maximum) { return maximum; } return value; } private RadScrollBarElement GetVeritcalScrollbar(GridTableElement tableElement) { if (GridViewElement.UseScrollbarsInHierarchy) { return tableElement.VScrollBar; } return GridViewElement.TableElement.VScrollBar; } } public RadForm1() { InitializeComponent(); CustomDragDropService customService = new CustomDragDropService(radGridView1.GridViewElement); radGridView1.GridViewElement.RegisterService(customService); }
Use the following code snippet:
ThemeResolutionService.ApplicationThemeName = "MaterialPink";
radGridView1.ElementTree.EnableApplicationThemeName = false;
radGridView1.ThemeName = "FluentDark";
Workaround:
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
RadDropDownListEditor ddlEditor = e.ActiveEditor as RadDropDownListEditor;
if (ddlEditor != null)
{
RadDropDownListEditorElement el = ddlEditor.EditorElement as RadDropDownListEditorElement;
el.Popup.ElementTree.EnableApplicationThemeName = false;
el.Popup.ThemeName = this.radGridView1.ThemeName;
}
}
When the "x" is used it seems that AllowSearchRow is not set to false because the toggle button has then to be pressed twice to show up the search mask again.
Please refer to the attached sample project and follow the steps in the gif file.
Workaround: custom filtering to control which rows to be visible or not: https://docs.telerik.com/devtools/winforms/controls/gridview/filtering/custom-filtering
private void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
{
e.Handled = true;
e.Visible = e.Row.Cells["Value"].Value.Equals( Double.NaN);
}
Please refer to the attached sample project and follow the steps from the grid file:
Steps to reproduce:
1. Filter the checkbox column to only show unchecked rows
2. Enter "5" for filtering the Name column
3. Click the checkbox column on the bottom row
4. Remove filter value in the Name column
This will result in the unrelated record showing as checked. Scrolling or changing sorting may refresh the cell. If the filter is cleared by using the No filter menu option, the problem is not observed
If you define which columns to be printed on separate pages and try to use the Print Settings dialog to change the orientation for example, the multi-page printing gets lost:
Here is the code snippet which result is illustrated in the attached gif file:
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers)
Me.RadGridView1.DataSource = Me.CustomersBindingSource
Me.RadGridView1.BestFitColumns()
End Sub
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
Dim document As New RadPrintDocument()
document.AssociatedObject = Me.RadGridView1
Dim printStyle As GridPrintStyle = New GridPrintStyle(RadGridView1)
Dim renderer As TableViewDefinitionPrintRenderer = New TableViewDefinitionPrintRenderer(RadGridView1)
renderer.PrintPages.Add(RadGridView1.Columns(0), RadGridView1.Columns(2), RadGridView1.Columns(5))
renderer.PrintPages.Add(RadGridView1.Columns(0), RadGridView1.Columns(1), RadGridView1.Columns(9))
renderer.PrintPages.Add(RadGridView1.Columns(8), RadGridView1.Columns(7))
renderer.PrintPages.Add(RadGridView1.Columns(3), RadGridView1.Columns(4), RadGridView1.Columns(6))
printStyle.PrintRenderer = renderer
RadGridView1.PrintStyle = printStyle
Dim dialog As New RadPrintPreviewDialog(document)
dialog.ShowDialog()
End Sub
You can also note it in demo application with this settings:
To reproduce: 1.Add a RadGridView with one column. 2.Select the form and in the Properties window, set the form's Localizable property to true. 3.Specify the column's HeaderText for the default language. 4.Set the form's Language property to French (France). 5.Specify the column's HeaderText for French (France). 6.Set the CurrentUICulture before the InitializeComponent method to "fr-FR". If you run the application, the column is localized as expected. 7.If you get back to the designer and change the form's Language property back to Default you will notice that the column's HeaderText disappears. Workaround: set the HeaderText programmatically according to the current language.
Steps to reproduce: 1. Create a form 2. Set its Localization property to true. 3. Add RadGridView to the form 4. Add 3 GridViewTextBoxColumn instances at design-time 5. Change the Language of the form to Polish 6. The variable names of the columns are changed (gridViewTextBoxColumn1 to gridViewTextBoxColumn4, gridViewTextBoxColumn2 to gridViewTextBoxColumn5, gridViewTextBoxColumn3 to gridViewTextBoxColumn6)