Hi,
below is a stripped down version of my rowdetail editor using a raddataform with a rowdetails template.
I tried adding CommandButtonsVisibility="All" but it did nothing. I want to show add, delete, edit etc. I'm only getting the edit button.
Some more issues.
1. The OK and Cancel Buttons are not picking up the global button style I have set in app.xaml.
2. Is it possible to have the OK button fire the RowEditEnded event?
3. The cancel button does not cancel the changes made in the dataform. Changes made to the form are immediately reflected in the
RadGridView. I would have expected the cancel button to set things back to their original values. Am I missing something?
4. How do I get the radform to default to edit mode so that the user does not have to hit the edit button in the upper right corner first?
I've attached a screen shot.
Any help would be GREATLY appreciated.
Thanks ... Ed
<Grid.Resources>
<DataTemplate x:Key="RowDetailsTemplate">
<telerik:RadTabControl x:Name="SamplesTab" HorizontalAlignment="Left"
Margin="8" VerticalAlignment="Center">
<telerik:RadTabItem Header="Sample Details" DataContext="{Binding}">
<Grid Width="Auto" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<telerik:DataFormDataField Grid.Row="0" Grid.Column="0"
Label="Client Sample Id:"
DataMemberBinding="{Binding Sample.ClientSampleID, Mode=TwoWay }"
VerticalAlignment="Top" />
<telerik:DataFormComboBoxField Grid.Row="1" Grid.Column="0" Label="Priority:"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type UserControl} },
Path=DataContext.Priorities}"
DisplayMemberPath="Value"
SelectedValuePath="Key"
DataMemberBinding="{Binding Sample.PriorityID, Mode=TwoWay }">
</telerik:DataFormComboBoxField>
</Grid>
</telerik:RadTabItem>
</telerik:RadTabControl>
</DataTemplate>
</Grid.Resources>
<telerik:RadGridView.RowDetailsTemplate>
<DataTemplate>
<telerik:RadDataForm CurrentItem="{Binding}" AutoGenerateFields="False"
EditTemplate="{StaticResource RowDetailsTemplate}"
NewItemTemplate="{StaticResource RowDetailsTemplate}"
ReadOnlyTemplate="{StaticResource RowDetailsTemplate}"
/>
</DataTemplate>
</telerik:RadGridView.RowDetailsTemplate>
Hi,
I use the RadScheduleView and I try to add an command to the TimeRuler line (on each date). I implement custom TimeRulerItemTemplateSelector like this :
TimeRulerItemTemplateSelector="{StaticResource CustomTimeRulerItemTemplateSelector}"
In this template, I use the HorizontalTimelineGroupTemplate with an TextBlock to format the text. This works great. I want to add an command to this TextBlock (or a button), but the command is never raised.
I have try with the InputBinding :
<
selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate
>
<
DataTemplate
>
<
TextBlock
TextAlignment
=
"Left"
Padding
=
"2,0"
>
<
TextBlock.Text
>
<
MultiBinding
Converter
=
"{StaticResource DateToStringFormatConverter}"
>
<
Binding
Path
=
"DateTime"
/>
<
Binding
Path
=
"DataContext.PlanningHelper.GroupHeaderStringFormat"
RelativeSource
=
"{RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}"
/>
</
MultiBinding
>
</
TextBlock.Text
>
<
TextBlock.InputBindings
>
<
MouseBinding
Command
=
"{Binding DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}}"
MouseAction
=
"LeftClick"
/>
</
TextBlock.InputBindings
>
</
TextBlock
>
</
DataTemplate
>
</
selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate
>
And with telerik:EventToCommandBehavior.EventBindings :
<
selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate
>
<
DataTemplate
>
<
TextBlock
TextAlignment
=
"Left"
Padding
=
"2,0"
>
<
TextBlock.Text
>
<
MultiBinding
Converter
=
"{StaticResource DateToStringFormatConverter}"
>
<
Binding
Path
=
"DateTime"
/>
<
Binding
Path
=
"DataContext.PlanningHelper.GroupHeaderStringFormat"
RelativeSource
=
"{RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}"
/>
</
MultiBinding
>
</
TextBlock.Text
>
<
telerik:EventToCommandBehavior.EventBindings
>
<
telerik:EventBinding
Command
=
"{Binding DataContext.TestCommand, RelativeSource={RelativeSource AncestorType={x:Type ucPlanning1:PlanningList}}}"
EventName
=
"MouseEnter"
/>
</
telerik:EventToCommandBehavior.EventBindings
>
</
TextBlock
>
</
DataTemplate
>
</
selectors:CustomTimeRulerItemTemplateSelector.HorizontalTimelineGroupTemplate
>
But my TestCommand is never call.
What's wrong with my code? How to implement command inside the TimeRuler?
Thanks for your help.
Hello,
I want to Change Deadline forecolor to Blue of Telerik Gantt view. Now it is in Red color.
Please help me.
Thanks in advance
Hi,
I have a fairly complex setup as shown below. I am using row details to act as an editor for the selected row in the gridview. I have Expand mode set to single so only one row can be expanded at a time. My question is how to validate data before the move to another row, or try to navigate elsewhere, or close the app, etc.? As you can see from the xaml, I tried wiring up the RowEditEnded command to the RowEditEnded event, but it doesn't seem to ever fire.
Any guidance would be greatly appreciated.
Thanks ... Ed
<
telerik:RadGridView
x:Name
=
"ssSamples"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type UserControl} },
Path
=
DataContext
.Samples}"
SelectedItem
=
"{Binding SelectedRow}"
MaxHeight
=
"500"
RowIndicatorVisibility
=
"Visible"
RowDetailsVisibilityMode
=
"VisibleWhenSelected"
>
<
telerik:EventToCommandBehavior.EventBindings
>
<
telerik:EventBinding
Command
=
"{Binding RowDetailsVisibilityChangingCommand}"
EventName
=
"RowDetailsVisibilityChanging"
PassEventArgsToCommand
=
"True"
/>
<
telerik:EventBinding
Command
=
"{Binding RowEditEndedCommand}"
EventName
=
"RowEditEnded"
PassEventArgsToCommand
=
"True"
/>
</
telerik:EventToCommandBehavior.EventBindings
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewToggleRowDetailsColumn
ExpandMode
=
"Single"
/>
<
telerik:GridViewDataColumn
Width
=
"auto"
Header
=
"Sample Key"
DataMemberBinding
=
"{Binding Sample.Sample_Key}"
/>
<
telerik:GridViewDataColumn
Width
=
"auto"
Header
=
"Client Sample Id"
DataMemberBinding
=
"{Binding Sample.ClientSampleID}"
/>
<
telerik:GridViewDataColumn
Width
=
"auto"
Header
=
"Arrival"
DataMemberBinding
=
"{Binding ArrivalDesc}"
/>
<
telerik:GridViewDataColumn
Width
=
"auto"
Header
=
"Status"
DataMemberBinding
=
"{Binding Sample.Status}"
/>
</
telerik:RadGridView.Columns
>
<
telerik:RadGridView.RowDetailsTemplate
>
<
DataTemplate
>
<
Grid
Width
=
"Auto"
HorizontalAlignment
=
"Stretch"
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<
Label
Grid.Row
=
"0"
Grid.Column
=
"0"
Content
=
"Client Sample Id:"
VerticalAlignment
=
"Top"
/>
<
TextBox
x:Name
=
"txtSampleId"
Grid.Row
=
"0"
Grid.Column
=
"1"
HorizontalAlignment
=
"Left"
Text
=
"{Binding Sample.ClientSampleID}"
Width
=
"250"
/>
<
Label
Grid.Row
=
"1"
Grid.Column
=
"0"
Content
=
"Priority:"
VerticalAlignment
=
"Top"
/>
<
telerik:RadComboBox
x:Name
=
"ddlPriority"
Grid.Row
=
"1"
Grid.Column
=
"1"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Width
=
"250"
SelectedValuePath
=
"Tag"
SelectedValue
=
"{Binding Sample.Priority, UpdateSourceTrigger=PropertyChanged }"
SelectedIndex
=
"0"
>
<
telerik:RadComboBoxItem
Content
=
"Low"
Tag
=
"Low"
/>
<
telerik:RadComboBoxItem
Content
=
"Medium"
Tag
=
"Medium"
/>
<
telerik:RadComboBoxItem
Content
=
"High"
Tag
=
"High"
/>
</
telerik:RadComboBox
>
<
Label
Grid.Row
=
"2"
Grid.Column
=
"0"
Content
=
"Arrival:"
VerticalAlignment
=
"Top"
/>
<
telerik:RadComboBox
x:Name
=
"ddlArrival"
Grid.Row
=
"2"
Grid.Column
=
"1"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Width
=
"250"
SelectedValuePath
=
"Tag"
SelectedValue
=
"{Binding Sample.Arrival, UpdateSourceTrigger=PropertyChanged }"
SelectedIndex
=
"0"
>
<
telerik:RadComboBoxItem
Content
=
"No"
Tag
=
"0"
/>
<
telerik:RadComboBoxItem
Content
=
"Park"
Tag
=
"1"
/>
<
telerik:RadComboBoxItem
Content
=
"Returned"
Tag
=
"2"
/>
<
telerik:RadComboBoxItem
Content
=
"Discarded"
Tag
=
"3"
/>
</
telerik:RadComboBox
>
<
Label
Grid.Row
=
"3"
Grid.Column
=
"0"
Content
=
"Status:"
VerticalAlignment
=
"Top"
/>
<
telerik:RadComboBox
x:Name
=
"ddlStatus"
Grid.Row
=
"3"
Grid.Column
=
"1"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Width
=
"250"
SelectedValuePath
=
"Tag"
SelectedValue
=
"{Binding Sample.Status, UpdateSourceTrigger=PropertyChanged }"
SelectedIndex
=
"0"
>
<
telerik:RadComboBoxItem
Content
=
"Incomplete"
Tag
=
"Incomplete"
/>
<
telerik:RadComboBoxItem
Content
=
"Complete"
Tag
=
"Complete"
/>
</
telerik:RadComboBox
>
<
Label
Grid.Row
=
"4"
Grid.Column
=
"0"
Content
=
"Description:"
VerticalAlignment
=
"Top"
/>
<
TextBox
x:Name
=
"txtSampleDesc"
Grid.Row
=
"4"
Grid.Column
=
"1"
Grid.ColumnSpan
=
"2"
Text
=
"{Binding Sample.SampleDescription }"
Height
=
"60"
Width
=
"250"
HorizontalAlignment
=
"Left"
TextWrapping
=
"WrapWithOverflow"
AcceptsReturn
=
"True"
VerticalScrollBarVisibility
=
"Auto"
VerticalAlignment
=
"Top"
VerticalContentAlignment
=
"Top"
/>
<
Label
Grid.Row
=
"5"
Grid.Column
=
"0"
Content
=
"Comments:"
VerticalAlignment
=
"Top"
/>
<
TextBox
x:Name
=
"txtSampleComments"
Grid.Row
=
"5"
Grid.Column
=
"1"
Grid.ColumnSpan
=
"2"
Text
=
"{Binding Sample.Comments }"
Height
=
"60"
Width
=
"250"
HorizontalAlignment
=
"Left"
TextWrapping
=
"WrapWithOverflow"
AcceptsReturn
=
"True"
VerticalScrollBarVisibility
=
"Auto"
VerticalAlignment
=
"Top"
VerticalContentAlignment
=
"Top"
/>
<
Label
Content
=
"Associated Techniques:"
Grid.Row
=
"0"
Grid.Column
=
"2"
HorizontalAlignment
=
"Left"
HorizontalContentAlignment
=
"Left"
Width
=
"350"
Height
=
"auto"
/>
<
StackPanel
Orientation
=
"Vertical"
Grid.Row
=
"1"
Grid.Column
=
"2"
Grid.RowSpan
=
"5"
MaxHeight
=
"210"
>
<
ItemsControl
x:Name
=
"lstTechniques"
ItemsSource
=
"{Binding AssociatedTechniques, Mode=TwoWay }"
Margin
=
"5,0,0,0"
>
<
ItemsControl.ItemsPanel
>
<
ItemsPanelTemplate
>
<
support:UniformGridWithOrientation
Orientation
=
"Vertical"
Columns
=
"4"
/>
</
ItemsPanelTemplate
>
</
ItemsControl.ItemsPanel
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
CheckBox
Content
=
"{Binding TechniqueID}"
IsChecked
=
"{Binding IsSelected, Mode=TwoWay}"
ToolTip
=
"{Binding TechniqueName}"
>
</
CheckBox
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
</
ItemsControl
>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadGridView.RowDetailsTemplate
>
</
telerik:RadGridView
>
Hello
Because
some action on my window alters datacontext attached to a radigridview, I need
to reset applied filter when datasource is altered.
I
tried to launch command myGried.FilterDescriptors.Clear(); on SourceUpdated,
DatacontextChange and DataLoaded event, but the first 2 aren't raised when
RaisePropertyChange is raised, the last one (DataLoaded event) is raised but
when I tried to clear FilterDescriptors, I got error that I can't alter
datasource when loading.
Any idea how can I clear FilterDescriptors when datacontext change?
Thanks
Directory: UI for WPF R3 2016/Binaries.NoXaml/WPF45.
I noticed that Telerik.Windows.Documents.xxx assemblies e. g.
all have a version number of 2016.3.1021.40 where I had actually expected 2016.3.1021.45. At least in former releases these assemblies ended in .40/.45. Now they have the same version number as the assemblies under /WPF40. This is somewhat confusing and can lead to errors.
Regards
Heiko
I am trying to color the Background of the TextBox within the RadComoboBox to be Pink is the search typed in fails.
<
Style
TargetType
=
"TextBox"
x:Key
=
"CustomComboTextBoxStyle"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding SearchFailed}"
Value
=
"true"
>
<
Setter
Property
=
"Background"
Value
=
"LightPink"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding SearchFailed}"
Value
=
"false"
>
<
Setter
Property
=
"Background"
Value
=
"White"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
When I run, the SearchFailed is false and the background is white and that appears to work. But when SearchFailed is true, the background does not change.
public bool SearchFailed
{
get { return _searchFailed; }
set
{
_searchFailed = value;
NotifyPropertyChanged( "SearchFailed" );
}
}
Is there something I need to do to tell the RadComboBox to update?
Since updating to the latest R3 2016 I get exceptions when loading a XAML form/window/control in these three assemblies from VS ShadowCache:
I cleared the whole ShadowCache folders, deleted all assemblies from my project/bin folder and did a clean rebuild, but the error message still appears. There is no specific error message except "Exception has been thrown by the target of an invocation". I can still work with VS but the error messages are very annoying.
Regards
Heiko
I have used telerik control for RadGridView in our application . With one application (Windows forms) it is behaving properly (windows 10 anniversary update)i.e it is getting dragged and droped but when i am trying the same thing in some other application we do not see the same behavior.
Description:
In second (WPF) application in UI we are not able to drag /drop the grid ( in windows 10 anniversary update) while in windows 8 we are able to perform both drag and drop operations.
The Telerik version which we are using is 2011.3.1220.40
.Net version of the Components- 4.0
Below are the properties used in telerik grid:
<telerik:RadGridView x:Name="SrResultsGridView"
Controls:StyleManager.Theme="Office_Blue"
AutomationProperties.AutomationId="SrResultsGridView"
AutoGenerateColumns="False"
AutoExpandGroups="True"
CanUserFreezeColumns="False"
AllowDrop="True"
CanUserDeleteRows="False"
ActionOnLostFocus="None"
AreRowDetailsFrozen="True"
CanUserInsertRows="False"
ClipToBounds="True"
IsScrolling="False"
UseLayoutRounding="True"
SelectionMode="Extended"
ClipboardPasteMode="Default"
IsReadOnly="True"
IsFilteringAllowed="False"
VirtualizingStackPanel.IsVirtualizing="True"
Can you help me with this if it is compatibality issue with win 10 Anniversary update or some code changes need to be done so that it works properly.
Regards,
Md Ahtesham