Hi -
I have been following the documentation on Calculated Fields (http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/features/localdatasourceprovider/local-calc-fields) to configure some custom calculated fields that are sums of a set of other fields. For example, I have Fields A, B, and C in my data provider, and I created a calculated field to sum the totals of each of them into one field that they can include in the PivotGrid if they want.
However, I would really like to give my users the ability to setup sums of any number of fields of their choosing. For example, they may want to see a field represented by a sum of Fields A and B, but not C.
Is there a way to offer them the ability to create their own calculated fields? If not, do you any recommendation for how I might achieve something like this?
Thanks,
Brett
I get the following error...
Error22[A]Telerik.Windows.Controls.RadColorPicker cannot be cast to [B]Telerik.Windows.Controls.RadColorPicker. Type A originates from 'Telerik.Windows.Controls.Input, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadFrom' at location 'C:\Program Files (x86)\Telerik\UI for WPF Q3 2015\Binaries\WPF45\Telerik.Windows.Controls.Input.dll'. Type B originates from 'Telerik.Windows.Controls.Input, Version=2015.3.1104.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' in the context 'LoadNeither' at location 'C:\Users\jeramy.soucy.ARCSERV\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache\hssazwpx.uhz\1chhzlsj.3vq\Telerik.Windows.Controls.Input.dll'.
Not sure how to resolve this.Hi there,
I have found that it is possible to export multiple GridViews into single Excel file via GridViewSpreadExport in Winform forum.
I wonder if this can be achieved in the UI for WPF libraries.
My objects is to export multiple grids into a single file, preferable both in PDF and XLSX.
Many thanks,
If my itemsource already has a very large datatable source for example with 6000+ columns and one line then update it to a small table by changing the itemsource.
private static void OnItemsSourcePropertyValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var dynamicGrid = d as DynamicGrid;
if (dynamicGrid == null)
return;
try
{
dynamicGrid.ItemsSource.Dispose();
dynamicGrid._grid.SelectedItems.Clear();
dynamicGrid._grid.SelectedItem = null;
dynamicGrid._grid.Rebind();
dynamicGrid.ItemsSource = null; stop here and no exception,code stop running
dynamicGrid.ItemsSource = e.NewValue as DataTable;
}
}
Does the version of Telerik WPF supports v.2014.3.1202.45 telerikQuickStart?
The areas circled in red in the attached png. I am having a tough time finding them in the templates and styles. Any hints would be appreciated.
Paul
Hi, while recently my company has officially bought software from you and, thus, I suppose has a support agreement, I want to post this to a general forum. Here are the issues I encountered with GridControl:
1) Select a cell in the grid, then select an entire row and then do any Ctrl+ / Shift+ command. This causes the selection to switch to one column selection only, which spans the old cell and the newly selected row in one way or another. Also the grid loses focus. I suppose that we could catch key presses and deal with them as we wish, but this default behaviour seems very strange.
2) Cut functionality (Ctrl-X) seems to not copy anything onto the clipboard. Shouldn't Cut behave exactly the same way as Copy (except that Cut removes cells contents and Copy does not)?
3) Adding new row functionality. If you double-click on the corner cell (on the cell with the "+" sign, located to the left of the "Click here to add new item" label), the grid contents disappears completely. Then you click a number of times on that "+" cell. Then you click out of it (anywhere on any blank cell). Then you see that you get N empty rows, where N is the number of clicks you did altogether. This seems to have been intended, however, I personally think it is very confusing. Is there a way to disable this behaviour?
4) This, I believe, is a genuine bug in the control! When you Copy over the hidden cells and then Paste, you can control the Paste behaviour using SkipHiddenColumns attribute. However, if you copy cells spanning hidden cells using Ctrl key (i.e. you are copying individual cells rather than a subsequent region of cells), Paste does something very weird: it adds empty hidden cells to the selection.
Here is an example of what I mean:
- grid
columns A B C D
values-row1 1 2 3 4
values-row2 5 6 7 8
- column B is hidden
Scenario 1:
- copy 1 and 3 as a subsequent region of cells (it would be subsequent, since column B is hidden)
- paste into the beginning of row2
- if SkipHiddenColumns=false,1 and 3 are pasted instead of 5 and 6
- if SkipHiddenColumns=true,1 and 3 are pasted instead of 5 and 7
Scenario 2:
- copy 1 and 3 as two separate cells using Ctrl keyboard key
- paste into the beginning of row2
- if SkipHiddenColumns=false,1 and 3 are pasted instead of 5 and 7 (WHY???)
- if SkipHiddenColumns=true,1 and 3 are pasted instead of 5 and 8 (WHY???) -- this is the worst!
<
Window
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"RGrid.MainWindow"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"2*"
/>
<
RowDefinition
Height
=
"2*"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
telerik:RadGridView
Grid.Row
=
"0"
ItemsSource
=
"{Binding TransferModules}"
SelectionMode
=
"Extended"
ShowInsertRow
=
"false"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
CanUserReorderColumns
=
"False"
ShowGroupPanel
=
"False"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Modul"
DataMemberBinding
=
"{Binding ShortName}"
Width
=
"100"
IsFilterable
=
"False"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Beschreibung"
DataMemberBinding
=
"{Binding Description}"
Width
=
"200"
IsFilterable
=
"False"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Header
=
"Status"
DataMemberBinding
=
"{Binding TransferStatus}"
Width
=
"*"
IsFilterable
=
"False"
IsReadOnly
=
"True"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<
DataGrid
Grid.Row
=
"1"
ItemsSource
=
"{Binding TransferModules}"
SelectionMode
=
"Extended"
CanUserDeleteRows
=
"False"
CanUserReorderColumns
=
"False"
AutoGenerateColumns
=
"False"
>
<
DataGrid.Columns
>
<
DataGridTextColumn
Header
=
"Modul"
Binding
=
"{Binding ShortName}"
Width
=
"100"
IsReadOnly
=
"True"
/>
<
DataGridTextColumn
Header
=
"Beschreibung"
Binding
=
"{Binding Description}"
Width
=
"200"
IsReadOnly
=
"True"
/>
<
DataGridTextColumn
Header
=
"Status"
Binding
=
"{Binding TransferStatus}"
Width
=
"*"
IsReadOnly
=
"True"
/>
</
DataGrid.Columns
>
</
DataGrid
>
<
Button
Grid.Row
=
"2"
Click
=
"Button_Click"
Content
=
"Add item"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
/>
</
Grid
>
</
Window
>
using
System;
using
System.Collections.Generic;
using
System.Collections.ObjectModel;
using
System.Linq;
using
System.Windows;
namespace
RGrid {
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public
partial
class
MainWindow : Window {
public
class
TM {
public
String ShortName {
get
;
set
; }
public
string
Description {
get
;
set
; }
public
string
TransferStatus {
get
;
set
; }
}
public
ObservableCollection<TM> TransferModules {
get
;
set
; }
private
List<TM> _TModules;
public
MainWindow() {
_TModules =
new
List<TM>();
for
(
int
nX = 0; nX < 5; nX++) {
_TModules.Add(
new
TM { Description =
"Des "
+ nX.ToString(), ShortName =
"SN"
+ nX.ToString(), TransferStatus =
"OK"
});
}
//comment the following line to see if it fail without messagebox too
_TModules[1].TransferStatus =
"ERROR"
;
TransferModules =
new
ObservableCollection<TM>();
InitializeComponent();
Loaded += MainWindow_Loaded;
DataContext =
this
;
}
void
MainWindow_Loaded(
object
sender, RoutedEventArgs e) {
foreach
(TM tM
in
_TModules) {
if
(tM.TransferStatus !=
"OK"
) {
if
(MessageBox.Show(
"Data not OK."
+ Environment.NewLine +
"Add anyways?"
,
"Please confirm"
, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) != MessageBoxResult.Yes) {
continue
;
}
}
TransferModules.Add(tM);
}
}
private
void
Button_Click(
object
sender, RoutedEventArgs e) {
TransferModules.Add(
new
TM { Description =
"Des "
, ShortName =
"SN"
, TransferStatus =
"OK"
});
}
}
}