or
<
telerik:RadGridView
x:Name
=
"radGridView"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"false"
RowIndicatorVisibility
=
"Collapsed"
ItemsSource
=
"{Binding States}"
SelectedItem
=
"{Binding SelectedItem, Mode=TwoWay}"
>
<!-- CONTEXTMENU -->
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"MachineStateContextMenu"
cal:RegionManager.RegionName
=
"MachineStateContextMenu"
Opened
=
"RadContextMenu_Opened"
>
<
telerik:RadMenuItem
Header
=
"Export"
Click
=
"RadMenuItem_Click"
>
<
telerik:RadMenuItem.Icon
>
<
Image
Source
=
"/Joma.Workbench.Core;component/Images/page_excel.png"
/>
</
telerik:RadMenuItem.Icon
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
IsSeparator
=
"True"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
</
telerik:RadGridView
>
n `MachineStateContextMenu` with one or more Items bound with commands.
<
StackPanel
>
<
telerik:RadMenuItem
Header
=
"Machinehistory"
Command
=
"{Binding MachineHistoryCommand}"
/>
</
StackPanel
>
`MachineHistoryCommand` is executed? My only idea at the moment is to fire an event via the eventaggregator to inform other modules about a changed selected row.
Are there any approaches that are more reasonable?
Greetings
Ralf
List<Company> companyList =
new
List<Company>();
for
(
int
i = 0; i < 800000; i++)
{
companyList.Add(
new
Company()
{
Id = i,
Name =
"test name "
+ i,
Address =
"test address "
+ i,
Revenue = 88888888,
BusinessAres =
"test area "
+ i,
});
}
radGridView1.ItemsSource = companyList;
List<Company> companyList =
new
List<Company>();
for
(
int
i = 0; i < 800000; i++)
{
companyList.Add(
new
Company()
{
Id = i,
Name =
"test name "
+ i,
Address =
"test address "
+ i,
Revenue = 88888888,
BusinessAres =
"test area "
+ i,
});
}
var viewList =
new
VirtualQueryableCollectionView(companyList) { LoadSize = 10 };
radGridView1.DataContext= viewList;
<
Window
x:Class
=
"WpfApplication1.MainWindow"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Loaded
=
"Window_Loaded"
>
<
Grid
>
<
telerik:RadGridView
HorizontalAlignment
=
"Stretch"
Margin
=
"0,43,0,0"
Name
=
"radGridView1"
ItemsSource
=
"{Binding}"
VerticalAlignment
=
"Stretch"
/>
<
Button
Content
=
"Button"
Height
=
"23"
HorizontalAlignment
=
"Left"
Margin
=
"23,12,0,0"
Name
=
"button1"
VerticalAlignment
=
"Top"
Width
=
"75"
Click
=
"button1_Click"
/>
</
Grid
>
</
Window
>
EditTriggers =
GridViewEditTriggers.CellClick;
AutoSelectOnEdit = true;
<
Style
TargetType
=
"telerik:GridViewCheckBox"
>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Center"
/>
</
Style
>