"IsContainedIn" and "IsNotContainedIn" operators currently not work properly with composite values like: "1, 2, 3"
The following code exhibits the problem. All you have to do is click the Wrapper column cell and bring down the dropdown. Then select the Phase column. You will get the app to crash in the FilterWrappers method.
namespace RadControlsWinFormsApp2
{
public partial class Form1 : Form
{
private String[] dataPhases = null;
private String[] dataWrappers = null;
public class Data
{
public Data(int ID, string Phase, int Wrapper)
{
this.ID = ID;
this.Phase = Phase;
this.Wrapper = Wrapper;
}
public int ID { get; set; }
public String Phase { get; set; }
public int Wrapper { get; set; }
}
public Form1()
{
InitializeComponent();
this.radGridView1.DataSource = new Data[] { new Data(1, "A", 1), new Data(2, "B", 2) };
}
private void Form1_Load(object sender, EventArgs e)
{
GridViewComboBoxColumn columnPhase = radGridView1.Columns["PHASE"] as GridViewComboBoxColumn;
dataPhases = new String[] { "A", "B", "C", "A/B/C" };
GridViewComboBoxColumn columnWrapper = radGridView1.Columns["WRAPPER"] as GridViewComboBoxColumn;
dataWrappers = new String[] { "", "1", "2" };
columnWrapper.DataSource = dataWrappers;
columnPhase.DataSource = dataPhases;
}
private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if (e.Column is GridViewComboBoxColumn)
{
RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
if (editor != null)
{
RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
editorElement.Filter = null;
}
}
switch (e.Column.Name)
{
case "WRAPPER":
{
GridViewComboBoxColumn cbc = e.Column as GridViewComboBoxColumn;
cbc.DataSource = dataWrappers;
RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
if (editor != null)
{
RadDropDownListEditorElement editorElement = (RadDropDownListEditorElement)editor.EditorElement;
editorElement.Filter = FilterWrappers;
}
}
break;
case "PHASE":
{
GridViewComboBoxColumn cbc = e.Column as GridViewComboBoxColumn;
cbc.DataSource = dataPhases;
}
break;
}
}
private bool FilterWrappers(RadListDataItem item)
{
int nWrapper = 0;
if (item.Value.ToString() != String.Empty)
nWrapper = Convert.ToInt32(item.Value);
return true;
}
}
}
The problem exist if Column.Remove() is executed for master level.
If you go to The Demos >> Grid View >> Performance >> Load 50,000 rows. And then drag the group to group by the first two columns, then editing cells is slow.
If RadGridView is bound to custom objects that implement IComparable<T>, Excel-like filtering does not work. Currently, the issue can be avoided through implementing IComparable instead.
When RadGridView is scrolled while selecting (SelectionMode is CellSelect), the control throws exception.
RadExpressionEditorForm to not close when the created expression is not valid.
Summary rows evaluation does not support custom aggregation expressions as Count(IIF(Result='Pass' ,1, Null))
Allow getting all child rows of GridViewGroupRowInfo before filtering and sorting operation to be applied.
The RadGridView should not leave its edit mode state, when scrolling is performed.
Add BestFitColumnMode.AllCells that performs column best fit operation over all rows.
Improve editors in RadGridView by allowing clipping when the control is scrolled.
Improve RadGridView API by allowing user to set styles for all rows and columns through styles as Microsoft DataGridView. Expose the following properties: - ColumnHeadersDefaultCellStyle - RowHeadersDefaultCellStyle - RowsDefaultCellStyle - DefaultCellStyle
Make possible users easily to change the behavior of replacing the null value with empty string.
Workaround:
DataTable table = new DataTable("table");
table.Columns.Add("ID", typeof(int));
DataColumn col = table.Columns.Add("Name", typeof(string));
col.AllowDBNull = false;
col.DefaultValue = string.Empty;
table.ColumnChanging += new DataColumnChangeEventHandler(table_ColumnChanging);
this.radGridView1.DataSource = table;
private void table_ColumnChanging(object sender, DataColumnChangeEventArgs e)
{
if (!e.Column.AllowDBNull && (e.ProposedValue == DBNull.Value || e.ProposedValue == null) && e.Column.DataType == typeof(string))
{
e.ProposedValue = string.Empty;
}
}
The Column Chooser of RadGridView should show the invisible columns sorted.
Char type filtering should be allowed for all filtering operators supported by the string type (except: StartsWith, EndsWith, Contains and NotContains)
The BestFitColumns algorithm should be performed for columns groups in ColumnGroupsViewDefinition.
When the RadGridView is bind to a data source, which contains a flagged enum, an instance of GridViewComboBoxColumn should be added and its editor should be checked drop down list.
To repriduce:
- Add a grid with Office2007Theme applied and sort by one of the columns
- Set RightToLeft to true
- Make sure the column width is no wider than the text
Workaround:
void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
GridHeaderCellElement headerCell = e.CellElement as GridHeaderCellElement;
if (headerCell != null)
{
if (radGridView1.ThemeName == "Office2007Silver" && e.Column.IsSorted)
{
headerCell.Arrow.Alignment = ContentAlignment.TopCenter;
headerCell.Arrow.Margin = new Padding(0, 1, 0, 0);
}
}
}
To reproduce: 1.Bind RadGridView to hierarchical data - no vertical scroll-bar is visible. 2.Select a certain row and expand the child template (click the expander) - vertical scroll-bar appears. 3.Scroll several rows downwards. 4.Click the expander to close the child template (the vertical scroll-bar should hide). As a result the selected row is changed.
Workaround: follow the approach below: GridViewHierarchyRowInfo row = null; bool keepParentRow = false; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.productsTableAdapter.Fill(this.nwindDataSet.Products); this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories); radGridView1.AutoGenerateHierarchy = true; radGridView1.DataSource = this.nwindDataSet; radGridView1.DataMember = "Categories"; radGridView1.CurrentRowChanging += radGridView1_CurrentRowChanging; radGridView1.ChildViewExpanded += radGridView1_ChildViewExpanded; radGridView1.MouseDown += radGridView1_MouseDown; } private void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e) { RadGridView grid = sender as RadGridView; if (grid != null && row != null && keepParentRow) { e.Cancel = true; } } private void radGridView1_MouseDown(object sender, MouseEventArgs e) { RadGridView grid = sender as RadGridView; if (grid != null) { GridExpanderItem expander = grid.ElementTree.GetElementAtPoint(e.Location) as GridExpanderItem; if (expander != null && row != null) { keepParentRow = true; } else { keepParentRow = false; } } } private void radGridView1_ChildViewExpanded(object sender, Telerik.WinControls.UI.ChildViewExpandedEventArgs e) { RadGridView grid = sender as RadGridView; if (grid != null && e.IsExpanded == false) { row = e.ParentRow as GridViewHierarchyRowInfo; } }