Hello,
I have a treeView and I want to bind each item command, command parameter and IsEnabled properties. If I bind just the IsEnabled property it works, but if I add the command binding, the command works, but IsEnabled binding breaks.
I use the following code:
<
telerik:RadTreeView
ItemsSource
=
"{Binding TreeViewModel.Categories}"
Grid.Row
=
"0"
>
<
telerik:RadTreeView.ItemTemplate
>
<
HierarchicalDataTemplate
ItemsSource
=
"{Binding SubCategories}"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
VerticalAlignment
=
"Center"
Text
=
"{Binding Name}"
/>
</
StackPanel
>
</
HierarchicalDataTemplate
>
</
telerik:RadTreeView.ItemTemplate
>
<
telerik:RadTreeView.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadTreeViewItem"
BasedOn
=
"{StaticResource RadTreeViewItemStyle}"
>
<
Setter
Property
=
"IsEnabled"
Value
=
"{Binding IsEnabled}"
/>
<
Setter
Property
=
"Command"
Value
=
"{Binding Path=DataContext.GoToTabCommand, RelativeSource={RelativeSource AncestorType=telerik:RadWindow}}"
/>
<
Setter
Property
=
"CommandParameter"
Value
=
"{Binding Name}"
/>
</
Style
>
</
telerik:RadTreeView.ItemContainerStyle
>
</
telerik:RadTreeView
>
How can I make both bindings to work?
Hello.
When using the Cell Change Event, if you use ClearFill(), it takes an infinite loop. Is there any way to prevent this?
xaml - radspreadsheet <
ActiveSheetChanged
=
"radSpreadsheet_ActiveSheetChanged"
/>
C# Code
private void radSpreadsheet_ActiveSheetChanged(object sender, EventArgs e)
{
radSpreadsheet.ActiveWorksheet.Cells.CellPropertyChanged += cells_CellPropertyChanged;
}
private void cells_CellPropertyChanged(object sender, CellPropertyChangedEventArgs e)
{
var isSameValue = e.Property.UseSameValueAsPreviousOnInsert;
var column = e.CellRange.FromIndex.ColumnIndex;
var row = e.CellRange.FromIndex.RowIndex;
CellSelection cell = (sender as Cells)[row, column];
var value = cell.GetValue().Value.RawValue;
if (string.IsNullOrEmpty(value))
{
cell.SetFill(Defines.RedFill);
if (column == 2)
{
cell.Worksheet.Rows[row].Remove();
}
}
else if (value == Defines.NoParam)
{
cell.SetFill(Defines.YellowFill);
}
else
{
cell.ClearFill(); // This cellChanged event loop.
}
}
Thanks.
Hello,
I'm using Telerik WPF R1 2021.
I'm using Automation to test our GUI and I came accross a problem from the RadComboBoxItemAutomationPeer
The property IsSelected isn't correctly retrieve when the RadComboBox is used with multiple selection as it uses the property "SelectedItem" and not "SelectedItems" to check the selection.
I don't want to override the whole Combobox to fix that so I will manage this some other way but if you think of another solution i'm all ears ;)
Regards,
Thomas
Hi.
I'm creating a UI to drag items from a RadListBox into a RadDiagramContainerShape. When dragging over the container shape a huge red border is generated, but it doesn't mix well with my app look and feel, is is possible to style it or remove it?
You can see an example here.
Hi,
i would like to move items with mouse and be able to cancel this operation with Esc key - cancel drag operation and move dragged item(s) back. How to do it correctly? I'm using MVVM patter if it does matter...
Thank you
Pavel
Dear Telerik support team,
I have a RadGridView with more than 1 groups headers. When I use Page-Up, Page-Down key control to navigate inside the grid, the scroll height doesn't take in account the height of grouping headers. So that, while pressed on PageDown, the scroll goes to the middle of the next "page".
I attached a scenario as below:
1. When I'm in the first row of grid (see image: Before_PageDown.png), if I put on "Page Down" key, I expect the selection cursor goes to line "10916" (the last line of my viewport).
2. However, in reality, when I pressed on Page Down, it goes to line "10353" (see image: After_PageDown.png),
Many thanks for your help!
As the title states, when I load persisted filters, they are applied correctly; however the filter icon is not highlighted. Is there any way to achieve this?
Thanks in advance,
Steve
Apparently I came across the following situation.
When having a RadPane as a TabbedDocument and Header set to Collapsed then if I dock another RadPane onto it as another TabbedDocument what happens after I remove the second RadPane, the first on shows a blank content, i.e. the original content of the first pane disappears.
Look at the following Code example:
<
telerik:RadDocking
Grid.Row
=
"1"
IsRestricted
=
"True"
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
Focusable
=
"False"
IsTabStop
=
"False"
>
<
telerik:RadPaneGroup
Focusable
=
"False"
>
<
telerik:RadPane
Focusable
=
"False"
IsTabStop
=
"False"
Visibility
=
"Collapsed"
PaneHeaderVisibility
=
"Collapsed"
CanUserClose
=
"False"
IsDockable
=
"False"
>
.... RadPane Contents Here ....
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
Focusable
=
"False"
IsTabStop
=
"False"
telerik:RadDocking.FloatingLocation
=
"300,300"
telerik:RadDocking.FloatingSize
=
"600,350"
InitialPosition
=
"FloatingDockable"
>
<
telerik:RadPaneGroup
x:Name
=
"radPaneGroup"
Focusable
=
"False"
>
<
telerik:RadPane
Header
=
"Test"
Focusable
=
"False"
LayoutUpdated
=
"RadPane_LayoutUpdated"
x:Name
=
"radPane"
IsTabStop
=
"False"
IsActive
=
"True"
>
<
TextBlock
FontSize
=
"48"
>Testing...</
TextBlock
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>