To reproduce: - add couple columns in design time - populate them in the form's constructor - subscribe to the cell formatting event where validation will be performed The result is that the indent cell hover displays the error text set and the data cells are formatted correctly, but the exclamation mark is not displayed until the grid is scrolled. It seems that the indent cell is not invalidated WORKAROUND: Call the Refresh method of the template
DateTimeColumn should open hitting the F4 key. WORKAROUND: this.radGridView1.EditorRequired += new EditorRequiredEventHandler(radGridView1_EditorRequired); void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e) {
Try to set the number of columns for the RadGridView to greater than 11230 columns, it throws "An item with the same key has already been added." exception. It does not happen when the code is run for the first time, but on any subsequent calls. Step to reproduce: 1. Create project with Windows form 2. Place RadGridView on form 3. Add following code: private void Form1_Load(object sender, EventArgs e) { radGridView1.VirtualMode = true; radGridView1.ColumnCount = 15000; } 4. Run application multiple times and you will get an exception at some moment during start up. NO WORKAROUND
STEPS TO REPRODUCE: 1) Create an excel file with sample string values (for example 3x3): | Value 1 | Value 2 | Value 3 | | Value 4 | Value 5 | Value 6 | | Value 7 | Value 8 | Value 9 | 2) Validate as double: private ErrorProvider errorProvider = new ErrorProvider(); void gridView_CellValidated(object sender, CellValidatedEventArgs e) { if (e.Value == null) { return; } var cell = e.Row.Cells[e.ColumnIndex]; double value = 0; if (double.TryParse(e.Value.ToString(), out value)) { cell.ErrorText = string.Empty; errorProvider.SetError(gridView, string.Empty); } else { cell.ErrorText = "Wrong input format"; errorProvider.SetError(gridView, "Wrong input format"); } } 3) Copy the cells from excel and paste them in the grid Expected result: Validate all cells Actual result: Only the current cell is being validated and the CellValidated and CellValidating events are not fired for the other cells WORKAROUND: public class CustomGridBehavior : BaseGridBehavior { Form1 form; public CustomGridBehavior(Form1 form) { this.form = form; } public override bool ProcessKey(KeyEventArgs keys) { if (keys.KeyCode == Keys.V && keys.Control) { GridControl.MasterTemplate.Paste(); foreach (GridViewRowInfo row in GridControl.ChildRows) { form.ValidateCell(row.Cells[GridControl.CurrentColumn.Index]); } return true; } return base.ProcessKey(keys); } } void gridView_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e) { foreach (RadMenuItem item in e.ContextMenu.Items) { if (item.Text == "Paste") { e.ContextMenu.Items.Remove(item); break; } } RadMenuItem myPasteItem = new RadMenuItem("Paste"); myPasteItem.Click += new EventHandler(myPasteItem_Click); e.ContextMenu.Items.Add(myPasteItem); } void myPasteItem_Click(object sender, EventArgs e) { gridView.MasterTemplate.Paste(); foreach (GridViewRowInfo row in gridView.ChildRows) { ValidateCell(row.Cells[gridView.CurrentColumn.Index]); } }
Create a GridViewComboBoxColumn. When you select the field either by tab or single-click, it is no longer possible to select a value by pressing an alpha-numeric key on keyboard. You must first press the down-arrow key, or select a value with the mouse. Pressing the down-arrow shouldn't be required.
Steps to reproduce - by using the code below follow these steps 1) Enter some text in the first cell 2) In the first ComboBox cell ("city") type the beginning of the word, for example "L", then the dataSource gets filtered and contains only items begins with "L". 3) Move down to the second Item by the down arrow key and choose it by pressing tab key 4) Now the next cell becomes focused, type in capital "M" Result: Exception: IndexOutOfRangeException - "Index was outside the bounds of the array." DataTable dt = new DataTable(); dt.Columns.Add("name"); dt.Columns.Add("city", typeof(int)); dt.Columns.Add("role", typeof(int)); radGridView1.DataSource = dt;. radGridView1.Columns.RemoveAt(1); radGridView1.Columns.RemoveAt(1); DataTable dtCities = new DataTable(); dtCities.Columns.Add("id", typeof(int)); dtCities.Columns.Add("name"); dtCities.Rows.Add(1, "New York"); dtCities.Rows.Add(2, "London"); dtCities.Rows.Add(2, "Lisabon"); GridViewComboBoxColumn cityCol = new GridViewComboBoxColumn("city"); cityCol.DataSource = dtCities; cityCol.ValueMember = "id"; cityCol.DisplayMember = "name"; cityCol.AutoCompleteMode = AutoCompleteMode.SuggestAppend; cityCol.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown; radGridView1.Columns.Add(cityCol); DataTable dtRoles = new DataTable(); dtRoles.Columns.Add("id", typeof(int)); dtRoles.Columns.Add("name"); dtRoles.Rows.Add(1, "Sales Man"); dtRoles.Rows.Add(2, "Manager"); GridViewComboBoxColumn roleCol = new GridViewComboBoxColumn("role"); roleCol.DataSource = dtRoles; roleCol.ValueMember = "id"; roleCol.DisplayMember = "name"; roleCol.AutoCompleteMode = AutoCompleteMode.SuggestAppend; roleCol.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown; radGridView1.Columns.Add(roleCol); WORKAROUND: Replace the editor with a new one to avoid reusage void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e) { if (e.EditorType == typeof(RadDropDownListEditor)) { e.Editor = new RadDropDownListEditor(); } }
Implement a property such as EncloseDataWithQuotes, which should get or set whether the exported data should contain quotes http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_gridcsvsettings_enclosedatawithquotes.html
To reproduce: - Create a GridViewMaskBoxColumn with standard mask type and mask set to "aaaaaaaaaa". - Bind the grid to the following DataTable: private static DataTable GridDataTable() { DataRow dr = default(DataRow); DataTable dt = new DataTable(); dt.Columns.Add("Description"); dr = dt.NewRow(); dr[0] = "1234567890"; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = "abc"; dt.Rows.Add(dr); return dt; } - Click the first cell in order to enter in edit mode. - Click the second cell and you will notice that the text is wrong. Workaround: - change the value in the CellEditor intialized event handler: void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { if (e.ActiveEditor is RadMaskedEditBoxEditor) { RadMaskedEditBoxEditor editor = e.ActiveEditor as RadMaskedEditBoxEditor; editor.MaskTextBox.Value = "___________"; editor.MaskTextBox.Value = (string)radGridView1.CurrentCell.Value; } }
IIF function in Expression for calculated columns does not work.
On DateTime column when IsNull or IsNotNull option has been chosen it throws exception.
When changing parent form Localization property the column's header text does not changes appropriately
When adding a new row in underling data source and SelectLastAddedRow is true the newly added row is set as current but it is out of visible grid area.
CellFormatting should not me thrown for filter cell elements.
Column's FormatString property should be applied to filter cells as well.
Excel-like filtering throws an exception if there is a combo-box column, which contains values of types System.DBNull
Assigning a custom type convertor to the column's DateTypeConvertor property does not work as expected.
When exporting to excel through ExportToExcelML class, Guid type values are not exported.
When applying a filter to RadGridView, there is inconsistency between underlying data source current row and grid's current row.
In some particular cases it is possible to experience a undesired scroll behaviour in RadGridView with lots rows. When clicking on first or second grid's row, it scrolls on row down and the first row goes out of sight.
If in underling datasource there are more than one field, which do not allow null values, trying to set them in DefaultValueNeeded event leads to exception "Column [columnName] does not allow nulls"