or
<telerik:RadTabControl Name="tabControlClient" DockPanel.Dock="Right" cal:RegionManager.RegionName="MainRegion" Margin="10 0 10 10" ScrollMode="Viewport" DropDownDisplayMode="Visible" DisplayMemberPath="Content"> |
<telerik:RadTabControl.ItemContainerStyle> |
<Style TargetType="{x:Type telerik:RadTabItem}"> |
<Setter Property="Header" Value="{Binding DataContext.HeaderInfo}" /> |
<Setter Property="Height" Value="25" /> |
<Setter Property="IsSelected" Value="True" /> |
</Style> |
</telerik:RadTabControl.ItemContainerStyle> |
</telerik:RadTabControl> |
public String HeaderInfo |
{ |
get { return "Labs Module"; } |
} |
#region INotifyPropertyChanged Membres |
public event PropertyChangedEventHandler PropertyChanged; |
protected void OnPropertyChanged(String propertyName) |
{ |
if (this.PropertyChanged != null) |
{ |
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
} |
} |
<telerik:RadTabControl Name="tabControlClient" DockPanel.Dock="Right" cal:RegionManager.RegionName="MainRegion" Margin="10 0 10 10" ScrollMode="Viewport" DropDownDisplayMode="Visible" DisplayMemberPath="Content"> |
<telerik:RadTabControl.ItemContainerStyle> |
<Style TargetType="{x:Type telerik:RadTabItem}"> |
<Setter Property="Header" Value="{Binding DataContext.HeaderInfo}" /> |
<Setter Property="HeaderTemplate"> |
<Setter.Value> |
<DataTemplate> |
<Grid> |
<TextBlock Text="{Binding Header}"></TextBlock> |
<Button Grid.Column="1" Margin="3 0 0 0" Content="x" Width="16" |
Height="16" HorizontalAlignment="right"/> |
</Grid> |
</DataTemplate> |
</Setter.Value> |
</Setter> |
<Setter Property="Height" Value="25" /> |
<Setter Property="IsSelected" Value="True" /> |
</Style> |
</telerik:RadTabControl.ItemContainerStyle> |
</telerik:RadTabControl> |
<telerik:RadGridView Margin="15,5,15,5" Name="gvRequest" Height="auto" Width="Auto" |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
telerik:StyleManager.Theme="Simple" AutoGenerateColumns="False" |
IsFilteringAllowed="False" FlowDirection="RightToLeft" ShowGroupPanel="False"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn UniqueName="ActivityName" Header="שם תת פעילות" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="RequestID" Header="מספר דרישה" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="RequestName" Header="שם דרישה" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="RequestTotal" Header="סכום הדרישה (K ש''ח)" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="RequestType" Header="סוג הדרישה" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="Supplier" Header="ספק" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="RequestBalance" Header="יתרה בדרישה (K ש''ח)" Width="Auto" /> |
</telerik:RadGridView.Columns> |
<telerik:RadGridView.HierarchyChildTemplate> |
<DataTemplate> |
<StackPanel DataContext="{x:Null}"> |
<telerik:RadGridView CanUserReorderColumns="False" Name="gvOrder" |
CanUserFreezeColumns="False" ShowGroupPanel="False" ColumnsWidthMode="Auto" AutoGenerateColumns="False" ItemsSource="{Binding}" |
Loaded="OnChildGridLoaded" FlowDirection="RightToLeft" IsFilteringAllowed="False" ShowColumnHeaders="True" ColumnBackground="AliceBlue" HorizontalContentAlignment="Right" ClipToBounds="True"> |
<telerik:RadGridView.Columns> |
<telerik:GridViewDataColumn UniqueName="OrderID" Header="מספר הזמנה" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="OrderName" Header="שם הזמנה" Width="Auto" /> |
<telerik:GridViewDataColumn UniqueName="OrderTotal" Header="סכום הזמנה (K ש''ח)" Width="Auto" /> |
</telerik:RadGridView.Columns> |
</telerik:RadGridView> |
</StackPanel> |
</DataTemplate> |
</telerik:RadGridView.HierarchyChildTemplate> |
</telerik:RadGridView> |
private void BindDataMainGrid() |
{ |
try |
{ |
DataSet dataSet = this.GetData(); |
// This is needed to make the grid use the HierarchyChildTemplate |
GridViewTableDefinition detailDefinition = new GridViewTableDefinition(); |
// Tell the detailsDefinition to pull its data from the Details DataTable. |
detailDefinition.DataSource = dataSet.Tables["Order"].DefaultView; |
// Specify the relation between the two tables, similar to what is done in the DataSet. |
TableRelation tr = new TableRelation(); |
tr.FieldNames.Add(new FieldDescriptorNamePair("RequestID", "RequestID")); |
detailDefinition.Relation = tr; |
// Add a GridViewTableDefinition to the grid to make it use the HierarchyChildTemplate |
// defined in XAML. |
if (this.gvRequest.TableDefinition.ChildTableDefinitions.Count < 1) |
this.gvRequest.TableDefinition.ChildTableDefinitions.Add(detailDefinition); |
// Bind the grid to the "master" table. |
this.gvRequest.ItemsSource = dataSet.Tables["Request"].DefaultView; |
} |
catch |
{ |
this.gvRequest.ItemsSource = CommonValues.GetDataTabel().DefaultView; |
} |
} |
private void OnChildGridLoaded(object sender, RoutedEventArgs e) |
{ |
// Pull data from the detail table based on the relation. |
var dataRowView = (DataRowView)((RadGridView)sender).ParentRow.DataContext; |
var ds = dataRowView.DataView.Table.DataSet; |
var childData = dataRowView.CreateChildView(ds.Relations["RequestID"]); |
// Manually set the DataContext of the child grid. |
// We have stopped a wrong DataContext propagating down to this child grid |
// in the XAML file by wrapping the child grid in a StackPanel and setting |
// the StackPanel's DataContext to null. |
((RadGridView)sender).DataContext = childData; |
} |
private DataSet GetData() |
{ |
try |
{ |
DataSet ds = new DataSet(); |
dsRequest dsr = ServiceData.GetRequestAndOrder(0,0,1,2009,0); |
ds.Tables.Add(dsr.Tables["Request"].Copy()); |
ds.Tables.Add(dsr.Tables["Order"].Copy()); |
ds.Relations.Add("RequestID", |
ds.Tables["Request"].Columns["RequestID"], |
ds.Tables["Order"].Columns["RequestID"]); |
return ds; |
} |
catch |
{ |
return null; |
} |
} |
Thanks
We have noticed with your chart control that when we set it so that the point labels are showing it makes the opacity of the series definition read only. Is there a way to disable this behavior or work around it so that we can change the opacity in this case? Currently we turn the opacity to 50% for all other series when the user hover’s the mouse over one of the series items in the legend. If the point labels are on and the opacity locked we are unable to do this. Any help on this matter would be greatly appreciated.
Thanks in advance
MacKenzie