FIX. RadGridView - the Text of GridColorCellElement cannot be set in CellFormatting
FIX. RadGridView - FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo should work with null using System; using System.Data; using System.Windows.Forms; using Telerik.WinControls.Data; using Telerik.WinControls.UI; namespace Lab.Grid { public partial class GridFilterEqualNullSupport : MainForm { private RadGridView gridView = new RadGridView(); public GridFilterEqualNullSupport() { InitializeComponent(); gridView.Dock = DockStyle.Fill; gridView.Parent = this; gridView.BringToFront(); gridView.EnableFiltering = true; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); DataTable table = new DataTable(); table.Columns.Add("Id", typeof(int)); table.Columns.Add("Name"); table.Columns.Add("Number", typeof(DateTime)); table.Rows.Add(1, "Ivan", DateTime.Now); table.Rows.Add(2, "Ivan", DateTime.Now.AddDays(-1)); table.Rows.Add(null, "Peter", DateTime.Now); table.Rows.Add(4, "George", null); table.Rows.Add(5, "George", null); table.Rows.Add(null, "George", null); table.Rows.Add(7, "Enzo", DateTime.Now.AddDays(-3)); table.Rows.Add(8, "Enzo", DateTime.Now.AddDays(5)); table.Rows.Add(null, "Enzo", null); table.Rows.Add(10, "Enzo", DateTime.Now.AddDays(-1)); gridView.DataSource = table; } protected override void OnButton1Click() { base.OnButton1Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton2Click() { base.OnButton2Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsNotEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton3Click() { FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, ""); gridView.FilterDescriptors.Add(filter1); } } }
1. Open attached project and run it. 2. Click button 1 and you will see that is not apply
FIX. RadGridView incorrect tooltips when scrolling is performed.
When Excel-like filtering dialog is used without explicitly setting the filter operation the filter dialog executes Contains operation and when the filtering is confirmed through the OK button, RadGridView executes Equals operation. Comment: the issue is not the equals operations, the problem is that we escape the '*' characters.
TextAllignment setting is not accepted neither through theme or through ViewCellFormatting event.
RadGridView. Incorrect behavior of arrow keys when RightToLeft is enabled.
RadGridView does not clear the GridSpinEditor value when navigating to another cell.
FIX. Filter cell values are not cleared when FilterDescriptors are cleared.
In RadGridView with AutoSizeRows enabled and GridViewComboBoxColumn, the row size is 5px when the row has no values. Once a value in the combo box is being selected it should change its size according to the selected value.
When RadGridView has AutoSizeRows enabled and contains GridViewComboBoxColumn, when the combo box is being opened the row size increases, which leads to overlapping the next row. The rest of the rows should arrange according to the increased size of the current row.
RadGridView with AutoSizeRows enabled, the combo box (in GridViewComboBoxColumn) does not close its drop down when combo item is being selected
FIX. RadGridView - reloading the datasource with auto size columns mode to fill and hidden row header column, causes the first column to expand of every data source setting with one pixel
FIX. RadGridView - unable to suppress MouseWheel event in RadDateTimeEditor To solve the issue you can handle the MouseWheel event of the hosted textbox: editorElement.TextBoxElement.TextBoxItem.HostedControl.MouseWheel When handling this event you should convert its arguments to HandledMouseEventArgs and set the Handled property to true
RadGridView PropertyBuilder throws exception when trying to open the FilterDescriptors for a column
FIX. RadGridView does not accept newly entered values when the form is being hidden and shown again.
When RadTextBox is bound to a column (GridViewTextBoxColumn) in RadGridVIew it shows the current cell value. But once new row is added the value in the text box does not clear. Instead the last value stays. In case you add another row the value is being cleared.
This happens after setting in property builder the RadGridViews', DataSource (containing more than one table).
To reproduce: - just subscribe to the event, sort the grid to fire it and check the property value Wordaround: ((SortDescriptor)e.NewItems[0]).PropertyName
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, 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