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
Hi Telerik team,
What i'm trying to achieve is very simple, I just want to set an Icon image to RadWindow Template so it will be reflected in every RadWindow instances I create later:
- I'm using Windows 8 theme and I have copied the needed XAML files.
- The image is a .ico file from the folder "Resources\MyImage.ico"
Although I have search in the documentation and in the forums I couldn't find a solution that find my needs, I do not want to use code behind to set the icon in every window.
I'm looking forward your response.
Best regards,
Pedro Galusso
Hello,
In my project I want to use Vista theme,How can I set fontsize globel like office2013 VisualStudio2013 etc?
eg:
VisualStudio2013Palette.Palette.FontSizeS = 13;
VisualStudio2013Palette.Palette.FontSize = 15;
VisualStudio2013Palette.Palette.FontSizeL = 17;
what should I do?
Greetings,
I've been using telerik grids for a long time now and been facing an issue lately or lack of my knowledge when it comes to grouping by the collection (not a property). Here's my scenario, I'm showing list of employees in the grid, each employee can have multiple roles and I want to group the data by roles and each group will list all the employees under that role.
I am binding my employees collection to a collectionviewsource and adding the groupdescriptions (collection of employee roles) but it ain't showing anything. I wanted to ask if it is possible to group by the collection in such a scenario? Thank you team telerik