Steps to reproduce: 1. Add a grid with several columns, so there is horizontal scroll bar 2. Add an image to the grid ImageList 3. In the CellFormatting assign the ImageKey of a cell to a value You will notice that the images are not applied initially. You have to scroll the column where you apply the images out of view and bring it back in to see the images. WORKAROUND Instead of setting the ImageKey property, set the Image property to the corresponding image from the image list.
Workaround: Use a custom editor and override IsModified method: class MyEditor : RadDropDownListEditor { public override bool IsModified { get { return true; } } } void radGridViewFilter_EditorRequired(object sender, EditorRequiredEventArgs e) { if (e.EditorType == typeof(RadDropDownListEditor)) { e.Editor = new MyEditor(); } }
RadGridView.- HierarchyDataProvider property of the GridViewTemplate should be set after the GridViewTemplate is added to Templates Collection.
When a mask is set to a GridViewMaskBoxColumn and string is applied as value, the visual element will show only the string without the mask literals. E.g. mask is set to ####/# and value is set to string "11112" the view will be 11112 instead of 1111/2. Ways to achieve this: 1. Use CellFormatting. 2. Use a custom type converter: Example of a custom TypeConverter could be seen from the following feedback item: http://feedback.telerik.com/Project/154/Feedback/Details/112463-fix-radgridview-the-textmaskformat-property-of-gridviewmaskboxcolumn-is-not-ta
Steps to reproduce: 1. Add three rows to a grid 2. Filter one through CustomFiltering 3. Run the project and apply a filter that will filter one of the remaining two rows 4. Now delete the filter value. You will see that the second row will not be visible although there is no filter. WORKAROUND Clear the filter on the column when the user deletes the value of the filter: private void radGridView1_ValueChanging(object sender, ValueChangingEventArgs e) { if (this.radGridView1.CurrentColumn.Name == "ColumnName" && Convert.ToString(e.NewValue) == String.Empty) { int i = 0; while (i < this.radGridView1.FilterDescriptors.Count) { if (this.radGridView1.FilterDescriptors[i].PropertyName == "ColumnName") { this.radGridView1.FilterDescriptors.RemoveAt(i); continue; } i++; } } }
RadGridView - You cannot select cells only from Pinned Columns if under them there is unpinned one. Steps to reproduce: 1. Set SelectionMode property of RadGridView to GridViewSelectionMode.CellSelect. 2. Create 3 left pinned columns 3. Create several unpinned columns. 4. Scroll horizontal scroll bar to hide several unpinned columns under the pinned. 5. Try to select only pinned cells with the selection rectangle.
In RadGridView with a TextBoxColumn. Set WrapText, Multiline and AcceptsReturn to true If adding a new line, the return gives another new line instead of staying within the cell. Workaround: Create a new behavior class: //VB Class MyNewRowBehavior Inherits GridNewRowBehavior Protected Overrides Function ProcessEnterKey(keys As KeyEventArgs) As Boolean If Me.GridControl.IsInEditMode AndAlso Me.GridControl.CurrentColumn.Name = "TextBoxColumn" Then Dim editor As RadTextBoxEditor = TryCast(Me.GridControl.ActiveEditor, RadTextBoxEditor) Dim element As RadTextBoxEditorElement = DirectCast(editor.EditorElement, RadTextBoxEditorElement) element.Text.Insert(element.Text.Length, Environment.NewLine) Return True Else Return MyBase.ProcessEnterKey(keys) End If End Function End Class //C# class MyNewRowBehavior : GridNewRowBehavior { protected override bool ProcessEnterKey(KeyEventArgs keys) { if (this.GridControl.IsInEditMode && this.GridControl.CurrentColumn.Name == "TextBoxColumn") { RadTextBoxEditor editor = this.GridControl.ActiveEditor as RadTextBoxEditor; RadTextBoxEditorElement element = (RadTextBoxEditorElement)editor.EditorElement; element.Text.Insert(element.Text.Length, Environment.NewLine); return true; } else { return base.ProcessEnterKey(keys); } } } then unregister the old behavior and register the new one: //VB DirectCast(radGridView1.GridBehavior, BaseGridBehavior).UnregisterBehavior(GetType(GridViewNewRowInfo)) DirectCast(radGridView1.GridBehavior, BaseGridBehavior).RegisterBehavior(GetType(GridViewNewRowInfo), New MyNewRowBehavior()) //C# ((BaseGridBehavior)radGridView1.GridBehavior).UnregisterBehavior(typeof(GridViewNewRowInfo)); ((BaseGridBehavior)radGridView1.GridBehavior).RegisterBehavior(typeof(GridViewNewRowInfo), new MyNewRowBehavior());
Workaround, use the following behavior: public class CustomDataRowBehavior : GridDataRowBehavior { protected override bool OnMouseDownRight(MouseEventArgs e) { if (this.IsInEditMode && !this.GridViewElement.EndEdit())
RadGridView - CustomGrouping event is not firing when you change some cell value and RadGridView is data bound via DataSource property. Workaround: 1.Subscribe to CellEndEdit event of RadGridView: this.radGridView1.CellEndEdit += new GridViewCellEventHandler(radGridView1_CellEndEdit); 2. Call Refresh method of MasterTemplate: void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { this.radGridView1.MasterTemplate.Refresh(); }
To reproduce: - Add a checkbox column to a grid - Add the following code to the ValueChanged event: void radGridView1_ValueChanged(object sender, EventArgs e) { if (radGridView1.CurrentColumn.Name == "BoolColumn") {
Steps to reproduce: 1. Add a combobox column to a grid 2. Set DisplayMember, ValueMember and a data source to the column 3. Change a property in the data source that is used as value in the combo column You will see that the combo column will not display text for the item which value was changed
RadGridView - does not scroll correctly when AutoSizeRows and EnableFastScrolling are set to true. Code to reproduce: radGridView1.BeginUpdate(); radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; radGridView1.AutoSizeRows = true; radGridView1.EnableFastScrolling = true; DataTable dt = new DataTable(); dt.Columns.Add("A"); dt.Columns.Add("B"); dt.Columns.Add("C"); for (int i = 0; i < 50; i++) { string[] array = new string[3]; array[0] = i.ToString(); array[1] = i.ToString(); array[2] = i.ToString(); dt.Rows.Add(array); } radGridView1.DataSource = dt; radGridView1.EndUpdate();
To reproduce, use the following code: Dim decimalCol As New GridViewMaskBoxColumn decimalCol.FieldName = "DecimalPhone" Me.RadGridView1.Columns.Add(decimalCol) decimalCol.DataType = GetType(Decimal) decimalCol.FormatString = "{0:(###) ###-####}" decimalCol.MaskType = MaskType.Standard decimalCol.Mask = "(###) ###-####" Try the following cases: 1. Go to an empty cell and press "1" -> the result is that you see the mask "(1__) ___-_____", however the caret is before it and continuing to type in the editor will replace the already added character 2. Click on an empty cell - the cell is opened for edit, however, the mask is not displayed. Furthermore, when you start typing and you press "1" -> the result is that you see the mask "(1__) ___-_____", however the caret is before it and continuing to type in the editor will replace the already added character
When a Right-To-Left grid is printed the text of all print cells should be drawn with the StringFormatFlags.DirectionRightToLeft. Example: RadGridView with RightToLeft set to Yes A decimal column with negative values the values in the decimal column are drawn as 96-, 88- etc if this grid is printed the values will be -96, -88 Workaround: http://www.telerik.com/community/forums/radprintdocument-from-a-grid-wrong-format-when-right-to-left-true-in-grid
To reproduce, use the following code: ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).DataType = typeof(decimal); ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).FormatString = "{0:(###) ###-####}"; ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).MaskType = MaskType.Standard; ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).Mask = "(###) ###-####"; ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).TextMaskFormat = MaskFormat.ExcludePromptAndLiterals; and add a numeric value in one of the column cells. Result -> Exception has been thrown by the target of an invocation. Workaround: Use a custom type converter: ((GridViewMaskBoxColumn)radGridView1.Columns["MaskEditBoxColumn"]).DataTypeConverter = new MyConverter(); public class MyConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { return sourceType == typeof(string); } public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(string)) { return true; } return base.CanConvertTo(context, destinationType); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { string s = value.ToString(); s= s.Insert(0, "("); if (value.ToString().Length > 3) { s= s.Insert(4, ")"); } if (value.ToString().Length > 7) { s= s.Insert(8, "-"); } return s; } return base.ConvertTo(context, culture, value, destinationType); } public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { string s = value.ToString(); s = s.Replace("(", ""); s = s.Replace(")", ""); s = s.Replace("-", ""); return Convert.ToDecimal(s); } }
To reproduce set AddNewRowPosition is Bottom and the NewRowEnterKeyMode is EnterMovesToNextCell and add a new row via na UI Workaround: void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Add && radGridView1.CurrentRow is GridViewNewRowInfo) { } }
To reproduce: - just subscribe to the event, sort the grid to fire it and check the property value Wordaround: ((SortDescriptor)e.NewItems[0]).PropertyName
Currently all export mechanisms export the first child view of a hierarchy row. There should be a mechanism to allow users to choose which view to be exported.
FIX. RadGridView - cursor does not work properly, when cursor has value "Cursors.SizeWE" and mouse is moving over GroupPanelElement. Steps to reproduce: 1. On a gridview make sure that a column in grouped. 2. Place your mouse on a column split just below the grouped column. 3. The cursor icon changes to a SizeWE icon to let you know that you can resize the column, This is normal. 4. Now, move the mouse (with the cursor icon = SizeWE) to the grouped column just above. 5. Now the cusor gets stucked with this SizeWE icon and never goes away on this grid. Wathever you do now the icon stays showing as a SizeWE icon. Work Around - create custom grid behavior and override OnMouseMove method. public class CustomGridBehavior : BaseGridBehavior { public override bool OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); GridTableElement table = this.GetGridTableElementAtPoint(e.Location); if (table == null) { this.GridViewElement.ElementTree.Control.Cursor = Cursors.Default; return false; } return false; } }