<
Controls1:RadDropDownButton
Name
=
"Report"
Content
=
"Report"
Margin
=
"5,0,0,0"
>
<
Controls1:RadDropDownButton.DropDownContent
>
<
Controls2:RadContextMenu
Name
=
"ReportMenu"
StaysOpen
=
"False"
ItemsSource
=
"{Binding ReportList}"
KeyboardNavigation.IsTabStop
=
"True"
/>
</
Controls1:RadDropDownButton.DropDownContent
>
</
Controls1:RadDropDownButton
>
public
class
JSlider : RadSlider
{
public
JSlider()
{
IsSelectionRangeEnabled =
true
;
}
/// <summary>
/// Raises the <see cref="E:System.Windows.FrameworkElement.SizeChanged"/> event, using the specified information as part of the eventual event data.
/// </summary>
/// <param name="sizeInfo">Details of the old and new size involved in the change.</param>
protected
override
void
OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base
.OnRenderSizeChanged(sizeInfo);
// setup the slider with the correct maximum based on our current available width
Minimum = 0;
Maximum = ActualWidth;
}
protected
override
void
OnSelectionRangeChanged(SelectionRangeChangedEventArgs oldValue, SelectionRangeChangedEventArgs newValue)
{
base
.OnSelectionRangeChanged(oldValue, newValue);
}
}
<
Grid
>
<
DockPanel
>
<
WpfApplication15:JSlider
DockPanel.Dock
=
"Bottom"
Height
=
"200"
/>
</
DockPanel
>
</
Grid
>
<telerik:GridViewDataColumn.Footer>
<GridView:AggregateResultsList ItemsSource="{Binding}" VerticalAlignment="Center" Grid.Column="4">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center" Text="{Binding FormattedValue}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</GridView:AggregateResultsList>
</telerik:GridViewDataColumn.Footer>
I do this but it doesn´t work:
var bindingFooter = new Binding { Path = new PropertyPath("FormattedValue") };
var frameworkElementFactoryFooter = new FrameworkElementFactory(typeof(TextBlock));
frameworkElementFactoryFooter.SetBinding(TextBlock.TextProperty, bindingFooter);
frameworkElementFactoryFooter.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Right);
var dataTemplateFooter = new DataTemplate { VisualTree = frameworkElementFactoryFooter };
dataTemplateFooter.Seal();
var itemControl = new ItemsControl() { ItemTemplate = dataTemplateFooter };
var listaAgregada = new AggregateResultsList();
listaAgregada.Items.Add(itemControl);
gridViewDataColumn.Footer = listaAgregada;
Thanks
<
telerik:GridViewDataColumn
Header
=
"In"
DataMemberBinding
=
"{Binding TimeIn}"
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadDateTimePicker
Culture
=
"en-GB"
SelectedDate
=
"{Binding TimeIn}"
TimeInterval
=
"0:30:00"
IsTooltipEnabled
=
"False"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
I' have a Grid with various columns. For eg. Grid havng a column with status. I want to enable / disable the buttons(edit button, cancel button) as per the status (that particular row selected). their are other columns in grid as wel.
<Button x:Name="btnEdit" Content="Edit" Style="{StaticResource GreyButtonStyle}" IsEnabled="{Binding EditEnable}" > <i:Interaction.Triggers> <i:EventTrigger EventName="Click"> <cmd:EventToCommand Command="{Binding Path=EditCustomerOrdersCommand}" PassEventArgsToCommand="True" /> </i:EventTrigger> </i:Interaction.Triggers> </Button>
<Telerik:GridViewDataColumn DataMemberBinding="{Binding Status}" Header="Status" TextWrapping="NoWrap" Width="*" />
I' using MVVM Pattern.