I've read this thread but it is a bit confusing and old: Live sorting/grouping in UI for WPF | Telerik Forums
What is the current situation?
I am having problems with Devexpress GridControl as they dont support what they call "Live Data Shaping" eg sorting with real-time updates IF you use WPF binding.
Question - can Telerik data grid and/or virtual grid do live data shaping where columns use custom templates with WPF binding to a dictionary. For example: `{Binding Fields[abc].Value}`?
Hello,
I found row-height setting API in WinForms, like Resizing Rows Programmatically- RadVirtualGrid - Telerik UI for WinForms .
But can't find it for WPF. I can make rows resizable by a user but can't do it programatically.
What I'd like to do is to control row height per cell content height.
Thanks.
Hanjo
Hello! I'm interested in the VirtualGrid control for WPF, since the demo looks very fast for very large data sets. For our application, we want to show a column group header, to indicate that a set of columns are related to each other. In this dummy example, the data for four people is displayed. We'd like to indicate that there were four groups of results for each person, and have the results displayed under each group like so:
Ideally, the Row header (the name of each person), the Column headers and the Column Group headers should be fixed, so the user can scroll the rows and columns at will, but still see the headers. We would also like to be able to capture mouse inputs when the user clicks on a column or row header or the group header, if possible.
Is something like this possible using the control?
Thanks,
Ed
I am setting both the FilterIconBackgroundFiltered and the FilterIconBackground properties on a RadVirtualGrid control in xaml. The FilterIconBackground property changes the filter icon color, but even after adding a filter to a column, the icon never changes to the FilterIconBackgroundFiltered color.
Any thoughts on why this might be happening?
Thanks!
<tk:RadVirtualGrid x:Name="VirtualGrid"
FontSize="{Binding FontSize}"
Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:ParticleReportControl}}, Path=Foreground}"
Background="{StaticResource GsBackgroundDark}"
CanUserFilterColumns="True"
CanUserSortColumns="True"
ColumnHeaderForeground="{StaticResource GsForegroundMain}"
ColumnHeaderBackground="{StaticResource GsBackgroundDark2}"
CellTextAlignment="Center"
LinesVisibility="Both"
IsFilterable="True"
FilterIconBackgroundFiltered="Red"
FilterIconBackground="{StaticResource GsForegroundMain}"
HorizontalLinesBrush="{StaticResource GsForegroundMain}"
VerticalLinesBrush="{StaticResource GsForegroundMain}"
MeasureTextOnRender="True"
ShowDistinctFilters="False"
tk:RadContextMenu.ContextMenu="{StaticResource CtxMenu}"
CellDecorationsNeeded="VirtualGrid_OnCellDecorationsNeeded"
HeaderCellDecorationsNeeded="VirtualGrid_OnHeaderCellDecorationsNeeded"
OverlayBrushesNeeded="VirtualGrid_OnOverlayBrushesNeeded"
HeaderSizeNeeded="VirtualGrid_HeaderSizeNeeded"
>
</tk:RadVirtualGrid>
In the top right corner of my RadVirtualGrid control there is a small rectangle that gets displayed over top of the column header text. It becomes more of an issue when the horizontal scrollbar is needed, and it obscures the header caption text. Please refer to the attached images.
Is this a bug in the rendering code? Is there a workaround?
Thanks!
I've got a Virtual Grid with 29 rows of data and 3 columns. I want to have a function that copies all of its contents to the clipboard. My handler looks like this:
private void RadMenuItem_OnClick(object sender, RadRoutedEventArgs e)
{
// Select all cells and then copy them to the clipboard
VirtualGrid.SelectAll();
VirtualGrid.CopyToClipboard();
}
I wrote my event handler for the CopyingCellClipboardContent event to use the cell row and column index to return the data item for whatever cell was requested:
private void VirtualGrid_OnCopyingCellClipboardContent(object? sender, VirtualGridCellClipboardEventArgs e)
{
if (TryGetCellString(e.Cell.RowIndex, e.Cell.ColumnIndex, out var s))
e.Value = s;
Debug.WriteLine($"Copying cell {e.Cell.RowIndex}, {e.Cell.ColumnIndex} => \'{e.Value}\'");
}
And sure enough, my handler was called 87 times (29 rows x 3 columns). But every single time it was called, the row and column index was exactly the same -- whatever row and column I had last clicked. here is some of my debug output
SelectedSellsChanged Copying Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000' Copying cell 1, 0 => '575.500, 1.000'
I can visually see the SelectAll() call selecting all the cells. And my selection mode is Extended. And it calls my handler the correct number of times.
So why does it keep asking me for exactly the same cell all 87 times? Shouldn't those row/column indices be changing?
I'm trying to use the VirtualGrid to show a collection of read-only "record" objects in a report. The problem is that each "record" is just a List<object> whose count and types are not know until runtime. The column titles are stored separately in a different list of field descriptors.
I tried the CellValueNeeded approach (i.e. without using any sort of DataSource, custom or otherwise), and while my data showed up just fine in the grid, I had no titles on the columns. There doesn't seem to be any way to set the titles with this approach that I can see. There is no corresponding ColumnTitleNeeded event, no SetColumnTitle function and no collection of columns I can access. At least not that I can see
So how do I set the column titles in code behind?
(I should add that I also tried the Custom DataSource approach I looked at your VirtualGrid_WPF example in the SDK, but that seems to rely on the fact that each object representing a record ("Club" in the example) has property names and types that areknown at build time. I could not make it work at all. )