I need to understand the best way to accomplish this.
I have an ItemType list. For each ItemType, I specify the type of TreeNode that can be defined. So, then I have an Item list. Each Item is assigned an ItemType and has a Children property which are more Item objects thus making the Hierarchy.
Question is, how do I filter the items in the Item Type Column's ComboBox in relation to the selected Hierarchy Node?
For pseudo code, do I:
Thanks for your help,
Joel
TreeListView Definition:
<
telerik:RadTreeListView
x:Name
=
"treeListView"
AutoGenerateColumns
=
"False"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
Grid.Row
=
"1"
Margin
=
"5"
IsReadOnly
=
"{Binding Context.IsReadOnly}"
ItemsSource
=
"{Binding Context.Hierarchy, Mode=TwoWay}"
SelectedItem
=
"{Binding Context.SelectedItem, Mode=TwoWay}"
AutoExpandItems
=
"True"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name, Mode=TwoWay}"
CellTemplate
=
"{StaticResource FirstColumnCellTemplate}"
IsReadOnly
=
"False"
Width
=
"*"
/>
<
telerik:GridViewComboBoxColumn
x:Name
=
"itemTypeColumn"
Header
=
"Item Type"
SelectedValueMemberPath
=
"Name"
DisplayMemberPath
=
"Name"
ItemsSource
=
"{Binding Context.ItemTypes}"
DataMemberBinding
=
"{Binding ItemTypeName, Mode=TwoWay}"
Width
=
"150"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsActive, Mode=TwoWay}"
Header
=
"Include"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
Hello,
In one of my grid views, I have group footers. The aggregate functions values displayed in the group footer should be horizontally centered, as the columns data.
I'm using the Office2013 theme.
How can I do this?
Hello, I am wondering if there is a known issue with items within a DataTemplate not persisting in Persistence Framework? I have a WPF application that has many RadGridViews. I use PersistenceManager to load and save grid settings from isolated storage. Persisting column orders and column sizes work perfectly on all of my grids. However there is one grid that uses a DataTemplate to contain a button for one column. Whenever the settings for this grid are saved and then reloaded the buttons disappear. Everything else on the grid persists, but the button is gone. I tried it on a simple test project to make sure that it wasn't some sort of binding issue and the problem remains. Here is the Test grid I try to persist.
<
telerik:RadGridView
x:Name
=
"grdTest1"
Margin
=
"0,5,0,0"
IsFilteringAllowed
=
"True"
Background
=
"Blue"
AlternateRowBackground
=
"DarkGray"
AlternationCount
=
"2"
IsReadOnly
=
"True"
AutoGenerateColumns
=
"False"
Visibility
=
"Visible"
MaxHeight
=
"250"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
Button
Content
=
"Test"
HorizontalContentAlignment
=
"Center"
VerticalContentAlignment
=
"Center"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"First Name"
DataMemberBinding
=
"{Binding FirstName}"
/>
<
telerik:GridViewDataColumn
Header
=
"Last Name"
DataMemberBinding
=
"{Binding LastName}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
When loaded the first time the button is there. If I close and reopen (Save and Load) the button disappears. If I manually delete the persistence manager file from isolated storage and reload the button is there. The rest of the settings will persist which is great, but the button does not. Please let me know if there is a way to use persistence framework on a grid in this scenario.
Thanks,
Michael.
I am using RadTreeView in WPF and need to support drag and drop in the tree view both to move nodes to different 'folders' as well as reorder nodes within a folder. A variety of conditions need to be met for a node to support drag and/or drop so I started by implementing drag and drop directly using the DragDropManager as opposed to the tree view's built in drag/drop behavior. I could not figure out how to reorder nodes using this approach so I reworked it to use the Tree View's drag drop support.
The problem with the later approach is that I don't want the tree view to automatically process the drop. I need to do it to make sure things stay in synch etc. I tried adding my own drop handler and setting e.Handled to true but it was too late. The tree view had already rearranged the data. So, the question is two fold I guess.
1) Is there a way to implement something like the move before/after in the built in drag drop support so I can reorder my tree using the DragDropManager directly?
2) Is there a way to override the drop behavior of the built in drag drop support so I can handle updating the data and hence make sure the rest of the system stays in synch?
Thanks
Dave Goughnour
Hello,
we used to use a third-party docking control in our application which had some problems with the RadScheduler control.
Hence we've decided to exchange it with the RadDocking control, thus getting rid of any problems but the following.
We use a single-window application based on the MVVM pattern. Our window's ViewModel contains a collection of ViewModels and a "CurrentViewModel" property.
At this time we use the document host functionality only, resulting in the docking control displaying the "current" view via data templates.
Each ViewModel instance has its own view instance, which is required to be able to save the visual state of each view when switching from one view (model) to another. Views get created in a separate ViewCache class that returns either an already cached or a newly-created view.
I've provided a sample so you can easily reproduce the following steps (see attachment, needs to be renamed to *.zip):
1. Click button "Blue":
A blue ViewModel is created and added to the collection of ViewModels. The RadDocking control creates a new RadDocumentPane making use of a custom DockingPanesFactory.
The related view is created by the view cache via the above-mentioned data templates - getting the blue ViewModel and the blue view's type.
So far everything works fine.
2. Click button "Red":
A red ViewModel is created and added to the collection of ViewModels. Again, the RadDocking control creates a new RadDocumentPane.
But now something strange is happening: the view cache receives the red ViewModel and the blue view's type, which isn't supposed to happen because no such data template even exists (intermediate state?).
The view cache gets queried a second time immediately, this time with the correct parameters (red ViewModel and red view's type). As an aftereffect the blue view, which was provided in the step before, gets returned by the cache.
3. Click another color button:
Each time another color button is clicked, the same issue occurs.
So why does this "intermediate state" happen? Is this the intended behavior or just a bug?
Thanks in advance,
Jochen
hi, i'm new in telerik and i want to use carousel panel for my menu in WPF. i want to switch to specific page when i clicked on one of the carousel items. i've used image and buttons as items but the click event for my button do not work. i also tried to use RadCarouselpanel inside the radcarousel but the problem is still alive!!!
how can i do that, thanks
Following something similar to your GridViewComboBoxColumn example I was able to get a column in the RadTreeListView working. However, my cell template needs an Image to show up. This data template doesn't work because the image is actually on the ItemType which is displayed successfully in the ComboBox... I don't know how to get that ItemType's Image to show up on the DataTemplate or even on a RadPropertyGrid.Item to display its properties when I select the Node:
Once again, thanks for your help,
Joel
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"FirstColumnCellTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"{Binding Image, Mode=TwoWay}"
/>
<
TextBlock
Text
=
"{Binding Name, Mode=TwoWay}"
Margin
=
"5"
/>
</
StackPanel
>
</
DataTemplate
>
</
UserControl.Resources
>
Tree:
<
telerik:RadTreeListView
x:Name
=
"treeListView"
AutoGenerateColumns
=
"False"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
Grid.Row
=
"1"
Margin
=
"5"
IsReadOnly
=
"{Binding Context.IsReadOnly}"
ItemsSource
=
"{Binding Path=Context.Hierarchy, Mode=TwoWay}"
SelectedItem
=
"{Binding Context.SelectedItem, Mode=TwoWay}"
AutoExpandItems
=
"True"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name, Mode=TwoWay}"
CellTemplate
=
"{StaticResource FirstColumnCellTemplate}"
IsReadOnly
=
"False"
Width
=
"*"
/>
<
telerik:GridViewComboBoxColumn
x:Name
=
"itemTypeColumn"
Header
=
"Item Type"
DataMemberBinding
=
"{Binding ItemTypeID, Mode=TwoWay}"
DisplayMemberPath
=
"Name"
SelectedValueMemberPath
=
"ID"
SortMemberPath
=
"Order"
SortingState
=
"Ascending"
ItemsSource
=
"{Binding TypeModel.Items, Mode=TwoWay}"
Width
=
"150"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsActive, Mode=TwoWay}"
Header
=
"Include"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
Hi,
I was wondering if there was any way the ordinary progress bar could display static markers like the below picture:
Today it works great but i would not know how to show static markers.
The reason I ask this is for 508 compliance.
Hi
Are there any examples on how to use the Transition Control with TileViewItem? I have a TileView that i update periodically and i would like to animate the tile items that are being loaded/changed.
any help would be appreciated.
Thanks
Zaheer