Currently, you can set the data format string of the cells in a GridView column by using the DataFormatString property of the column.
Add a mechanism to select the DataFormatString per cell. For example, this can be done using the CellStyleSelector and a new property in the GridViewCell. Or by introducing DataFormatStringSelector property.
"ArgumentException: Must specify valid information for parsing in the string."
The exception is handled internally but results in the filtering not being applied.
SearchStateManager property is null when trying to change any of the properties of the SearchStateManager object in the Loaded event. This behavior is observed when the ShowSearchPanel property is not set to true initially.
Hi Telerik,
I have created a sample project for an issue I have found:
Please see the code behind of the sample.
When removing a column from a grid where the display index was changed, and rows are selected, I do get an ArgumentOutOfRangeException.
Any help is appreciated!
Thank you!
Thomas
private void RadGridView_ColumnReordering(object sender, Telerik.Windows.Controls.ColumnReorderingEventArgs e)
{
int notResizeableColumnIndex = 1;
if (e.NewDisplayIndex == notResizeableColumnIndex)
{
e.Cancel = true;
}
}
Currently, when you click F2 or double mouse click in order to start editing a cell (with a TextBox editor) its text gets selected. This happens because the SelectAll() method of the underlying TextBox is called. Add a property that allows to disable this behavior and to avoid selecting the text.
At this point you can get this effect by creating a custom column and overriding its PrepareCellForEdit() method as shown here: https://docs.telerik.com/devtools/wpf/knowledge-base/kb-gridview-prevent-f2-text-selection
The GridView allows you to drag-to-reorder its columns. When start dragging the clicked element is accessed and a screenshot is made from it. Then the drag visual shows an image of the dragged column header. In some cases the drag visual gets clipped.
To work this around, you can subscribe the GridViewHeaderCell elements to the DragDropManager's DragInitialize event and replace the default drag visual with a custom one.
private void RadGridView_CellLoaded(object sender, Telerik.Windows.Controls.GridView.CellEventArgs e)
{
if (e.Cell is GridViewHeaderCell)
{
Dispatcher.BeginInvoke(new Action(() =>
{
DragDropManager.AddDragInitializeHandler(e.Cell, OnHeaderCellDragInitialize, true);
}));
}
}
private void RadGridView_CellUnloaded(object sender, Telerik.Windows.Controls.GridView.CellEventArgs e)
{
if (e.Cell is GridViewHeaderCell)
{
Dispatcher.BeginInvoke(new Action(() =>
{
DragDropManager.RemoveDragInitializeHandler(e.Cell, OnHeaderCellDragInitialize);
}));
}
}
private void OnHeaderCellDragInitialize(object sender, DragInitializeEventArgs e)
{
var dragSource = e.OriginalSource as GridViewHeaderCell;
if (dragSource != null)
{
var dragVisual = new Border()
{
BorderBrush = Brushes.LightGray,
BorderThickness = new Thickness(1),
Background = new SolidColorBrush(Colors.Bisque) { Opacity = 0.4 },
Width = dragSource.ActualWidth,
Height = dragSource.ActualHeight,
Child = new TextBlock()
{
Text = (string)dragSource.Column.Header,
Margin = new Thickness(5, 0, 5, 0),
VerticalAlignment = VerticalAlignment.Center }
};
e.DragVisual = dragVisual;
}
}
The property changed of the property bound to IsExpandableBinding (property of RadGridView) is not reflected in the row. To reproduce this the IsPropertyChangedAggregationEnabled property of RadGridView should be set to True (which is the default value) and the view model property (bound to IsExpandableBinding) should be updated consequently with other properties of the view model. For example:
myRowModel.Name = "New name";
myRowModel.IsExpandable = false;
To work this around, use the IsExpandable property of GridViewRow. You can data bind it using the RowStyle property of RadGridView. Or alternatively, set the IsPropertyChangedAggregationEnabled property of RadGridView to False.
Some of the rows of the RadGridView control are missing, when placed inside a RadPane and one of the newer themes is set via StyleManager.
As a workaround, set the UseLayoutRounding property of the RadGridView control to False.
Currently, to modify the background color of this element, the default control template of the GridViewCell element needs to be extracted, and the VisualState with x:Name="Highlighted" would need to be customized.
We could include an API for modifying the background color of the HighlightTextBlock element, when it is highlighted.