Hi,
I need to do a binding with a simple generic list of Decimal ( LIST<Decimal> ).
This list<> contain de data i need to bind in my xaml UserControl in C# windows project.
How must i proceed PLEASE ?
When a set the ItemsSource to this list<> this doesn't work...
THANKS for one example please
Dear
Telerik Support Team,
I am using
version 2015.2.623.45 to replace Syncfusion components with Telerik ones.
Now is Docking
turn. One of customer request is to open different tools and dock them in a
Document view. Each tool (a User Control) has it’s own Ribbon that has to be
merged with the one on the main window. I succeeded in my porting but to fulfil
all requirements I need also to know (with an event) when a document-docked
control has been selected. I did not find an event to hook that could be used.
In attachment,
you can find a sample project.
Can you
help me?
Thank you
Domenico
Hi,
I implemented some custom connections, deriving them from RadDiagramConnection. My connections have their own properties and visual aspect (defined using styles). I'd like to use the Telerik connection tool to draw my custom connection: how can i set the custom connection type to the connection tool?
Thank you in advance
Paolo
I have an issue with RadMaskedNumericInput where the value returned only has 1 decimal even the 2 decimals were input.
The xaml looks like this:
<
telerik:RadMaskedNumericInput
Name
=
"AddHours"
Width
=
"75"
Mask
=
"#,###.##"
SelectionOnFocus
=
"SelectAll"
Value
=
"{Binding AddHours}"
UpdateValueEvent
=
"LostFocus"
Culture
=
"en-CA"
Grid.Column
=
"3"
Grid.Row
=
"1"
HorizontalContentAlignment
=
"Right"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Margin
=
"3"
Padding
=
"2"
Style
=
"{StaticResource HoursStyle}"
PreviewKeyDown
=
"RadMaskedNumericInput_PreviewKeyDown"
/>
Bound Property
public decimal AddHours
{
get { return addHours; }
set
{
if (addHours != value)
{
addHours = value;
OnPropertyChanged("AddHours");
}
}
}
Hey, i have a RadTreeListView that i used to display my data, when i change the value of RowDetailsTemplate property in runtime, the event that called SelectionChanged fired more than 15 times, here is my code:
XAML Code:
<telerik:RadTreeListView ItemsSource="{Binding ItemSearchingResults}"
RowDetailsVisibilityMode="VisibleWhenSelected"
ScrollViewer.VerticalScrollBarVisibility="Auto"
RowDetailsTemplate="{Binding RowDetailsTemplate}"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
CanUserFreezeColumns="False" SelectionMode="Single"
VerticalAlignment="Stretch" SelectionUnit="FullRow"
CanUserDeleteRows="False" GridLinesVisibility="Both"
CanUserInsertRows="False" AutoGenerateColumns="False"
AutoLoadHierarchy="True" HierarchyColumnIndex="1" HierarchyIndent="25"
RowIndicatorVisibility="Collapsed" ShowColumnFooters="False" HorizontalAlignment="Stretch">
<telerik:RadTreeListView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemNumber}" IsReadOnly="True"
Header="{x:Static tterpResources:UcItemSearching.Number}" Width="*" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemArabicName}" IsReadOnly="True"
Header="{x:Static tterpResources:UcItemSearching.ArabicName}" Width="*" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemEnglishName}" IsReadOnly="True"
Header="{x:Static tterpResources:UcItemSearching.EnglishName}" Width="*" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemGroupArabicName}" IsReadOnly="True"
Header="{x:Static tterpResources:UcItemSearching.Group}" Width="*" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemTypeArabicName}" IsReadOnly="True"
Header="{x:Static tterpResources:UcItemSearching.Type}" Width="*" />
</telerik:RadTreeListView.Columns>
<interactivity:Interaction.Triggers>
<interactivity:EventTrigger EventName="SelectionChanged">
<interactions:CallMethodAction MethodName="OnSelectItemChanged" TargetObject="{Binding}" />
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>
<telerik:RadTreeListView.ChildTableDefinitions>
<telerik:TreeListViewTableDefinition ItemsSource="{Binding ChildItems,
RelativeSource={RelativeSource AncestorType=models:ItemSearchingModel}}" />
</telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>
C# Code:
public void OnSelectItemChanged()
{
if (SelectedItem == null || !SelectedItem.IsDataChanged) return;
//Get child items of selected item.
if (!SelectedItem.IsChildLoadedOnce)
{
SelectedItem.IsChildLoadedOnce = true;
SelectedItem.ChildItems = GetChildItemsOfParentItem(SelectedItem.ItemTreeId);
}
//Get alternative items of selected item.
if (!SelectedItem.IsAlternativeLoadedOnce)
{
SelectedItem.IsAlternativeLoadedOnce = true;
SelectedItem.AlternativeItems = GetAlternativeItemsOfSelectedItem(SelectedItem.ItemTreeId);
}
RowDetailsTemplate = SelectedItem.AlternativeItems.Count > 0 ? Application.Current.FindResource("AlternativeItemsDataTemplate") as DataTemplate : null;
}
private ObservableCollection<ItemSearchingModel> GetChildItemsOfParentItem(long parentItemId)
{
var childItems = _erpEntities.ItemTrees.Where(itemTree => itemTree.ParentId == parentItemId);
if (!childItems.Any()) return new ObservableCollection<ItemSearchingModel>();
var childItemSearchingModelList = new ObservableCollection<ItemSearchingModel>();
foreach (var childItemTree in childItems)
{
childItemSearchingModelList.Add(new ItemSearchingModel
{
ItemTreeId = childItemTree.Id,
ItemNumber = childItemTree.Number,
ItemArabicName = childItemTree.NameArabic,
ItemEnglishName = childItemTree.NameEnglish,
ChildItems = new ObservableCollection<ItemSearchingModel>(),
AlternativeItems = new ObservableCollection<ItemSearchingModel>(),
ItemTypeArabicName = childItemTree.ItemsType != null ? childItemTree.ItemsType.NameArabic : string.Empty,
ItemTypeEnglishName = childItemTree.ItemsType != null ? childItemTree.ItemsType.NameEnglish : string.Empty,
ItemGroupArabicName = childItemTree.ItemsGroup != null ? childItemTree.ItemsGroup.NameArabic : string.Empty,
ItemGroupEnglishName = childItemTree.ItemsGroup != null ? childItemTree.ItemsGroup.NameEnglish : string.Empty
});
}
return childItemSearchingModelList;
}
private ObservableCollection<ItemSearchingModel> GetAlternativeItemsOfSelectedItem(long selectedItemId)
{
//Get the child items.
var alternativeItems = _erpEntities.AlternativeItems.Where(itemTree => itemTree.BasicItemTreeId == selectedItemId);
if (!alternativeItems.Any()) return new ObservableCollection<ItemSearchingModel>();
var alternativeItemsSearchingModelList = new ObservableCollection<ItemSearchingModel>();
foreach (var childItemTree in alternativeItems)
{
alternativeItemsSearchingModelList.Add(new ItemSearchingModel
{
ItemTreeId = childItemTree.Id,
IsAlternativeLoadedOnce = true,
ItemNumber = childItemTree.ItemTree.Number,
ItemArabicName = childItemTree.ItemTree.NameArabic,
ItemEnglishName = childItemTree.ItemTree.NameEnglish,
ChildItems = new ObservableCollection<ItemSearchingModel>(),
AlternativeItems = new ObservableCollection<ItemSearchingModel>(),
ItemTypeArabicName = childItemTree.ItemTree.ItemsType != null ? childItemTree.ItemTree.ItemsType.NameArabic : string.Empty,
ItemTypeEnglishName = childItemTree.ItemTree.ItemsType != null ? childItemTree.ItemTree.ItemsType.NameEnglish : string.Empty,
ItemGroupArabicName = childItemTree.ItemTree.ItemsGroup != null ? childItemTree.ItemTree.ItemsGroup.NameArabic : string.Empty,
ItemGroupEnglishName = childItemTree.ItemTree.ItemsGroup != null ? childItemTree.ItemTree.ItemsGroup.NameEnglish : string.Empty
});
}
return alternativeItemsSearchingModelList;
}
Hey,
I have RadTreeListView named ItemsTree and i have another RadTreeListView named ChildItemsTree, the ChildItemsTree is inside the RowDetailsTemplate of ItemsTree, when the user selects an item from the ChildItemsTree i noticed that the selected item of ItemsTree does not clear. what i want to do is to clear the selected items of ItemsTree when the user selects an item from the ChildItemsTree​ and vice versa.
Thanks in advance.
Hello,
I was wondering if there was any new option in the control to modify at once several cells of a GridViewComboBoxColumn, as I am using the same ItemsSourceBinding for all rows of that column (in my GridView, the selection ​is: SelectionMode="Multiple" SelectionUnit="FullRow").
I found that as a string point, but is there some other builtin/custom option than that kind:
http://www.telerik.com/forums/editing-multiple-cells-at-once
Thanks,
Christophe