Space is premium on my TreeListView. I removed the Row Selector but I still seem to have a column reserved for it. Is there a way to set that column to zero width or eliminate it all together?
Thanks for your help,
Joel.
Data Templates:
<
DataTemplate
x:Key
=
"TreeNodeTemplate"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"auto"
/>
<
ColumnDefinition
Width
=
"auto"
/>
</
Grid.ColumnDefinitions
>
<
Image
Grid.Column
=
"0"
Source
=
"{Binding Image, Mode=TwoWay}"
ToolTip
=
"{Binding Barcode, Mode=TwoWay}"
/>
<
Image
Grid.Column
=
"0"
Height
=
"20"
Width
=
"20"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Margin
=
"-20,0,0,0"
Source
=
"{Binding StatusImage, Mode=TwoWay}"
ToolTip
=
"{Binding StatusName, Mode=TwoWay}"
/>
<
TextBlock
Grid.Column
=
"1"
Text
=
"{Binding Name, Mode=TwoWay}"
Margin
=
"5"
ToolTip
=
"{Binding Description}"
/>
</
Grid
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"TreeNodeEditTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
StackPanel
Orientation
=
"Vertical"
>
<
Image
Height
=
"20"
Width
=
"20"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Source
=
"{Binding StatusImage, Mode=TwoWay}"
ToolTip
=
"{Binding StatusName, Mode=TwoWay}"
/>
<
Image
Source
=
"{Binding Image, Mode=TwoWay}"
VerticalAlignment
=
"Top"
/>
</
StackPanel
>
<
Grid
Margin
=
"5"
Background
=
"Cornsilk"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"auto"
/>
<
RowDefinition
Height
=
"auto"
/>
</
Grid.RowDefinitions
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"125"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"28"
/>
<
RowDefinition
Height
=
"28"
/>
<
RowDefinition
Height
=
"28"
/>
<
RowDefinition
Height
=
"28"
/>
<
RowDefinition
Height
=
"auto"
/>
</
Grid.RowDefinitions
>
<
Label
Content
=
"ID:"
Grid.Column
=
"0"
Grid.Row
=
"0"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Grid.Column
=
"1"
VerticalAlignment
=
"Center"
Text
=
"{Binding ID, Mode=TwoWay}"
/>
<
Label
Content
=
"Name:"
Grid.Column
=
"0"
Grid.Row
=
"1"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBox
Grid.Column
=
"1"
Grid.Row
=
"1"
VerticalAlignment
=
"Center"
Text
=
"{Binding Name, Mode=TwoWay}"
IsEnabled
=
"{Binding IsEditableStatus}"
IsReadOnly
=
"{Binding IsEditableStatus, Converter={StaticResource BoolToOppositeBoolConverter}}"
/>
<
Label
Content
=
"Description:"
Grid.Column
=
"0"
Grid.Row
=
"2"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBox
Grid.Column
=
"1"
Grid.Row
=
"2"
VerticalAlignment
=
"Center"
Text
=
"{Binding Description, Mode=TwoWay}"
IsEnabled
=
"{Binding IsEditableStatus}"
IsReadOnly
=
"{Binding IsEditableStatus, Converter={StaticResource BoolToOppositeBoolConverter}}"
/>
<
Label
Content
=
"Barcode:"
Grid.Column
=
"0"
Grid.Row
=
"3"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBox
Grid.Column
=
"1"
Grid.Row
=
"3"
VerticalAlignment
=
"Center"
Text
=
"{Binding Barcode, Mode=TwoWay}"
/>
</
Grid
>
<
GroupBox
Header
=
"Status"
Grid.Row
=
"4"
Margin
=
"5"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"125"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"28"
/>
<
RowDefinition
Height
=
"28"
/>
</
Grid.RowDefinitions
>
<
Label
Content
=
"CRUD Status:"
Grid.Column
=
"0"
Grid.Row
=
"0"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Grid.Column
=
"1"
Grid.Row
=
"0"
VerticalAlignment
=
"Center"
Text
=
"{Binding StatusName, Mode=TwoWay}"
/>
<
Label
Content
=
"Inspect Status:"
Grid.Column
=
"0"
Grid.Row
=
"1"
HorizontalAlignment
=
"Right"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Grid.Column
=
"1"
Grid.Row
=
"1"
Text
=
"{Binding InspectStatusName, Mode=TwoWay}"
VerticalAlignment
=
"Center"
/>
</
Grid
>
</
GroupBox
>
</
Grid
>
</
StackPanel
>
</
DataTemplate
>
Control Configuration:
<
telerik:RadTreeListView
x:Name
=
"treeListView"
AutoGenerateColumns
=
"False"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
CanUserFreezeColumns
=
"False"
CanUserReorderColumns
=
"False"
SelectionMode
=
"Single"
Grid.Row
=
"1"
Margin
=
"5"
IsReadOnly
=
"{Binding IsReadOnly}"
ItemsSource
=
"{Binding Hierarchy, Mode=TwoWay}"
SelectedItem
=
"{Binding SelectedItem, Mode=TwoWay}"
IsExpandedBinding
=
"{Binding IsExpanded, Mode=TwoWay}"
AutoExpandItems
=
"True"
ShowGroupPanel
=
"False"
IsFilteringAllowed
=
"False"
ShowColumnHeaders
=
"False"
EditTriggers
=
"F2"
HierarchyIndent
=
"12"
MinColumnWidth
=
"12"
RowIndicatorVisibility
=
"Hidden"
MouseDoubleClick
=
"treeListView_MouseDoubleClick"
PreviewMouseLeftButtonDown
=
"treeListView_PreviewMouseLeftButtonDown"
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name, Mode=TwoWay}"
CellTemplate
=
"{StaticResource TreeNodeTemplate}"
CellEditTemplate
=
"{StaticResource TreeNodeEditTemplate}"
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}"
IsReadOnly
=
"True"
Width
=
"150"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsActive, Mode=TwoWay}"
Header
=
"Include"
/>
</
telerik:RadTreeListView.Columns
>
</
telerik:RadTreeListView
>
When I use this control or the numeric control I can only type 3 digits and 2 are positioned after the decimal, if I keep typing digits it just overwrites the last decimal place. Initial value is zero, decimal property, version 2015.2.623.45.
<
telerik:RadMaskedCurrencyInput
Width
=
"100"
InputBehavior
=
"Replace"
Mask
=
"c9.2"
SelectionOnFocus
=
"SelectAll"
Value
=
"{Binding TotalAmount}"
Culture
=
"en-CA"
Grid.Column
=
"5"
Grid.Row
=
"1"
HorizontalContentAlignment
=
"Right"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
/>
public decimal TotalAmount
{
get
{
return workDetail.Total;
}
set
{
if (workDetail.Total != value)
{
workDetail.Total = value;
OnPropertyChanged("TotalAmount");
}
}
}
Hi,
I'm using the latest version of Telerik and I created a UserControl which contain a RadImageEditorUI. My UserControl contain a property named "Image" of type "Stream" and I would like to know how I can display it in the editor and I would like to know also how I can take the image in the editor and transform it as a stream?
Thank's
Alain
Hi, I would like to use RadTreeView to display a flat list, but all items have significant indentation.
I could have used a RadListBox, but since I have the same nodes in a hierarchically TreeView another place in the application, I thought using the same control would be the easiest way to get the same look and functionality (context menu, click etc).
My idea was to set the ItemTemplate of the treeview to a normal DataTemplate or a HierarchicalDataTemplate without specifying ItemSource. It works as I want, except that there is an indention of all the items, leaving a lot of space to the left.
I have also tried to set the ExpanderStyle to a style containing a collapse template, but it only seems to affect the indentation of child items.
I would like to find out if there is a good way of applying DTED information on top of the RadMap so that whenever a user clicks on the
Map location the elevation information can be retrieved. Currently it seems to me that the RadMap can read data from shape files only.
Possible to convert DTED to raster base information to be applied on RadMap?
If this isn't possible, telling me "no" would be fully acceptable but I must ask:
Thanks for your help,
Joel
I have thisRadDataPager
<telerik:RadDataPager x:Name="radDataPager" Grid.Row="1" Source="{Binding ItemCollection}" DockPanel.Dock="Bottom" PageSize="400" DisplayMode="First, Last, Next, Previous, Text" />
I bind to it in the ItemsSource of a RadGridView:
<Controls:RadGridView x:Name="_rgvAdSales"
SelectedItem="{Binding Selected​Item, Mode=TwoWay}"
ItemsSource="{Binding PagedSource, ElementName=radDataPager}"
EnableRowVirtualization="False"
AutoGenerateColumns="False"
SelectionMode="Extended">...​
My columns look like this:
<Controls:GridViewDataColumn Header="Name" DataMemberBinding="{Binding ​Name}" IsReadOnly="True" />
Resharper draws a lin​e under Name (the path of the binding in the column) and says this:
Cannot resolve property 'Name' in data context of type 'Telerik.Windows.Data.IPagedCollectionView'
I have tried to add d:DataContext, but I cannot get that to work.
​
If I bind the ItemsSource of RadGridView directly to the ItemCollection on the ViewModel, then resharper does not give any warnings.
Do you know of any good way (ie. not causing performance loss) to tell resharper the datatype of the ItemSource or datacontext of the column?
Thanks,
​
Hello,
I'm trying to get the RadContextMenu attached to the RadScheduleView to open at the currently selected slot, appointment or empty field using the Apps key (a.k.a. keyboard rightclick).
So far I've tried changing the PlacementTarget ​in the RadContextMenu's OnOpening event, but I can't find a way to get the actual source.
RadContextMenu.elementCausedContextMenuOpen is TimeLineRulerPanel, hence RadContextMenu.GetClickedElement<AppointmentItem>() returns null.
Placing the RadContextMenu at MousePoint is not an alternative as it could be anywhere within the application.
So is it event possible to get the current scheduler child control to place the ContextMenu at?
Thanks in advance!
Jochen
​