To reproduce: - Use RadDock with MDI mode. - Add a form that contains a grid. - Set the theme to Aqua. Workaround: grid.GridViewElement.ForeColor = Color.Black;
To reproduce: public class ProgressBarCellElement : GridDataCellElement { public ProgressBarCellElement(GridViewColumn column, GridRowElement row) : base(column, row) { } private RadProgressBarElement radProgressBarElement; protected override void CreateChildElements() { base.CreateChildElements(); radProgressBarElement = new RadProgressBarElement(); this.Children.Add(radProgressBarElement); } protected override void SetContentCore(object value) { if (this.Value != null && this.Value != DBNull.Value) { this.radProgressBarElement.Value1 = Convert.ToInt16(this.Value); } } protected override Type ThemeEffectiveType { get { return typeof(GridDataCellElement); } } public override bool IsCompatible(GridViewColumn data, object context) { return data is ProgressBarColumn && context is GridDataRowElement; } } public class ProgressBarColumn : GridViewDataColumn { public ProgressBarColumn() : base() { } public ProgressBarColumn(string fieldName) : base(fieldName) { } public override Type GetCellType(GridViewRowInfo row) { if (row is GridViewDataRowInfo) { return typeof(ProgressBarCellElement); } return base.GetCellType(row); } }
It does not matter the type of the control that we want to move the focus on as well as if it was RadControl or not To reproduce: private void radGridView1_CellBeginEdit(object sender, Telerik.WinControls.UI.GridViewCellCancelEventArgs e) { e.Cancel = true; // Some other control to move the focus on this.textBox1.Focus(); } Workaround: Before cancelling the event set the value of the active editor to the current cell value private void radGridView1_CellBeginEdit(object sender, Telerik.WinControls.UI.GridViewCellCancelEventArgs e) { this.radGridView1.ActiveEditor.Value = e.Row.Cells[e.Column.Name].Value; e.Cancel = true; // Some other control to move the focus on this.textBox1.Focus(); }
To reproduce: private void Form1_Load(object sender, EventArgs e) { GridSearchRowElement searchRow = null; foreach (GridRowElement row in this.radGridView1.TableElement.VisualRows) { if (row is GridSearchRowElement) { searchRow = row as GridSearchRowElement; break; } } if (searchRow != null) { searchRow.SearchCellElement.SearchBoxWidth = 400; } } Workaround: radGridView1.TableElement.InvalidateMeasure(true); radGridView1.TableElement.UpdateLayout();
To reproduce: create a form with a button on it where on its Click event you show another form with the following code snippet: public class Dummy { public int ID { get; set; } public string Description { get; set; } } public Form1() { InitializeComponent(); this.radGridView1.FilterChanged += radGridView1_FilterChanged; if (File.Exists(@"..\..\..\layout.xml")) { this.radGridView1.LoadLayout(@"..\..\..\layout.xml"); } else { radGridView1.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Id ", FieldName = "ID" }); radGridView1.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Description", FieldName = "DESCRIPTION" }); } radGridView1.EnableFiltering = true; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; radGridView1.MasterTemplate.ShowFilteringRow = true; var items = new List<Dummy>(); for (int i = 0; i < 20; i++) { var dummy = new Dummy { ID = i, Description = string.Format("Description_{0}", i) }; items.Add(dummy); } radGridView1.AutoGenerateColumns = false; radGridView1.DataSource = items; } private void radGridView1_FilterChanged(object sender, GridViewCollectionChangedEventArgs e) { this.radGridView1.SaveLayout(@"..\..\..\layout.xml"); } Please refer to the attached gif file illustrating the steps.
To reproduce: 1. Add a RadGridView and a RadButton. 2. Populate the grid with data and call the BestFitColumns( BestFitColumnMode.AllCells) method (or resize the columns). 3. Set its RightToLeft property to Windows.Forms.RightToLeft.Yes. 3. In the RadButton.Click event handler call the RadGridView.PrintPreview(). As a result the columns are shrunk. Please see the attached gif file. Workaround: Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click Me.RadGridView1.BeginUpdate() Me.RadGridView1.PrintPreview() Me.RadGridView1.EndUpdate() Me.RadGridView1.BestFitColumns(BestFitColumnMode.AllCells) End Sub
To reproduce: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers) Me.RadGridView1.BestFitColumns(Telerik.WinControls.UI.BestFitColumnMode.AllCells) Me.RadGridView1.Columns(2).IsPinned = True Me.RadGridView1.Columns(2).PinPosition = Telerik.WinControls.UI.PinnedColumnPosition.Left Me.RadGridView1.Columns(5).IsPinned = True Me.RadGridView1.Columns(5).PinPosition = Telerik.WinControls.UI.PinnedColumnPosition.Left Dim summaryItem As New GridViewSummaryItem() summaryItem.Name = "ContactTitle" summaryItem.Aggregate = GridAggregateFunction.Count Dim summaryRowItem As New GridViewSummaryRowItem() summaryRowItem.Add(summaryItem) Me.RadGridView1.SummaryRowsBottom.Add(summaryRowItem) Me.RadGridView1.MasterTemplate.ShowTotals = True Me.RadGridView1.EnableKineticScrolling = True Me.RadGridView1.MasterView.SummaryRows(0).PinPosition = PinnedRowPosition.Bottom End Sub Please refer to the attached gif file.
It would be great if multi-page printing is supported for grids with ColumnGroupsViewDefinition and HtmlViewDefinition.
To reproduce: - Add checkbox column to a grid and enable filtering. - Filter on other column so there are no rows visible. - The header cell checkbox is checked automatically. Workaround: void radGridView_CreateCell(object sender, GridViewCreateCellEventArgs e) { if (e.CellType == typeof(GridCheckBoxHeaderCellElement)) { e.CellElement = new GridCheckBoxHeaderCellElement(e.Column,e.Row); ((GridCheckBoxHeaderCellElement)e.CellElement).CheckBox.ToggleStateChanging += CheckBox_ToggleStateChanging; } } void CheckBox_ToggleStateChanging(object sender, StateChangingEventArgs args) { if (radDevices.ChildRows.Count == 0) { args.Cancel = true; } }
To reproduce: public Form1() { InitializeComponent(); GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn("DecimalColumn"); decimalColumn.FormatString = "{0:N0}"; decimalColumn.FieldName = "Price"; radGridView1.MasterTemplate.Columns.Add(decimalColumn); GridViewCommandColumn commandColumn = new GridViewCommandColumn("CommandColumn"); commandColumn.FormatString = "{0:N0}"; commandColumn.FieldName = "Price"; radGridView1.MasterTemplate.Columns.Add(commandColumn); radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.SaveLayout(@"..\..\..\layout.xml"); this.radGridView1.LoadLayout(@"..\..\..\layout.xml"); FillData(); } private void FillData() { List<Item> items = new List<Item>(); for (int i = 0; i < 5; i++) { items.Add(new Item(i * 2.35m)); } radGridView1.DataSource = items; } public class Item { public decimal Price { get; set; } public Item(decimal price) { this.Price = price; } } Workaround: use the CellFormatting event and format the GridCommandCellElement.CommandButton.Text property: private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { if (e.Column is GridViewCommandColumn && e.CellElement.Value != null) { GridCommandCellElement commandCell = e.CellElement as GridCommandCellElement; commandCell.CommandButton.Text = string.Format("{0:N0}", e.CellElement.Value); } }
To reproduce: - Set the column like this: GridViewMaskBoxColumn col = new GridViewMaskBoxColumn(); col.Mask = "&&&&&&&&&&"; col.MaskType = MaskType.Standard; col.FieldName = "Name"; col.TextMaskFormat = MaskFormat.IncludeLiterals; - Type two words and press enter. Workaround: public class MyRadMaskedEditBoxEditor : RadMaskedEditBoxEditor { public override object Value { get { if (this.MaskTextBox.Mask == "my mask") { return this.MaskTextBox.Value; } return base.Value; } set { base.Value = value; } } }
To reproduce: - Open the Search Row sample in the demo application. - Type some text in the search textbox. - Using the context menu of the search textbox add some unicode control characters.
To reproduce, use the following code and afterwards check the CurrentRow.Index property: this.grid.BeginUpdate(); GridViewDataRowInfo newRow = new GridViewDataRowInfo(grid.MasterView); this.grid.Rows.Add(newRow); this.grid.EndUpdate(); Workaround: radGridView1.Rows.IndexOf(radGridView1.CurrentRow);
To reproduce: - Create a custom column that uses RadTextBoxControlElement as permanent editor. - Add the column to the grid. - Scroll the grid so the custom column is not visible. - Put the the grid in edit mode and change the current cell. Workaround: - Disable the IME support: public class MyRadTextBoxControlElement : RadTextBoxControlElement { protected override Type ThemeEffectiveType { get { return typeof(RadTextBoxControlElement); } } protected override void OnLoaded() { this.InvalidateMeasure(); } }
The issue appears when selecting multiple cells using mouse drag outside of the bounds of the control. Add a large number of columns (100) and a few rows, press the first cell and drag quickly as far to the right as possible. When you scroll back and check the selection, you will see that some cells are not selected.
To reproduce: - Enable the search row in the 50000 rows example. - Set the 5 last rows RowIndex value to null. - Set the filter of the RowIndex column to "Is null" and then to "Is not null" - Type 499 in the search row. - Set the filter of the RowIndex column to "Is null" and then to "Is not null" again. Workaround: public class MyGridViewSearchRowInfo : GridViewSearchRowInfo { public MyGridViewSearchRowInfo(GridViewInfo viewInfo) : base(viewInfo) { } protected override int GetCurrentCellTraverserColumnIndex() { if (this.ViewTemplate.MasterTemplate.Owner.CurrentRow == null) { return -1; } return base.GetCurrentCellTraverserColumnIndex(); } } //change the row like this: void radGridViewDemo_CreateRowInfo(object sender, GridViewCreateRowInfoEventArgs e) { if (e.RowInfo is GridViewSearchRowInfo) { e.RowInfo = new MyGridViewSearchRowInfo(e.ViewInfo); } }
private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { GridColorPickerEditor colorEditor = e.ActiveEditor as GridColorPickerEditor; if (colorEditor!=null) { GridColorPickerElement colorPicker = colorEditor.EditorElement as GridColorPickerElement; colorPicker.ReadOnly = true; } } Please refer to the attached gif file. Workaround: private void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e) { if (e.EditorType == typeof(GridColorPickerEditor)) { e.Editor = new GridColorPickerEditor(); } }
Please refer to the attached gif file. Workaround: this.radGridView1.GridBehavior = new CustomBaseGridBehavior(); public class CustomBaseGridBehavior : BaseGridBehavior { public override bool OnMouseMove(MouseEventArgs e) { GroupPanelSizeGripElement grip = this.GridViewElement.ElementTree.GetElementAtPoint(e.Location) as GroupPanelSizeGripElement; if (grip != null) { this.GridViewElement.ElementTree.Control.Cursor = Cursors.SizeNS; return true; } return base.OnMouseMove(e); } }