I am new to Telerik controls having recently migrated from Xceed.
I’m attempting some simple editing of a dataset using the RadGridView control.
I bind the ItemSource of the RadGridView through code. When I click on an auto generated column, the data editing works perfectly. When I try to edit a column that I have defined as a GridViewDataColumn, I get an empty text box (the bound data disappears) and my changes to do not commit when I leave the column.
telerik:RadGridView Name="gvInelig" telerik:StyleManager.Theme="Office_Black">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding EmpNameFullLF}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Take the grid above for example. I have defined one column called "Name" which is bound to a column in the dataset called "EmpNameFullLF". I can see my defined "Name" column along with the auto generated "EmpNameFullLF" column in my grid.
When I click to edit the "Name" column, the bound data disappears and I get an empty text box. If I type and hit enter, my change does not commit.
When i click into the auto generated "EmpNameFullLF" column, I can change the bound data and my change persists when the row leaves edit mode.
Obviously, I’m missing something. It's probably something simple. However, I’ve looked through the demos and I don’t see what it is. Any help is greatly appreciated. Thank you.
Hi,
I followed this link (http://docs.telerik.com/devtools/wpf/controls/radmenu/populating-with-data/binding-to-dynamic-data.html#binding-to-dynamic-data) from telerik documentation to build radmenu, but I don't know how to add the command for each item.
help plz
Hello,I'm new in WPF. Let me explain you what is my case. So i have three RadTreeView, my point is, is it possible when I expand one of the the item in the first tree automatically to expand the same element in the others trees? And I have another question how to make every line in the RadTreeView to be different color?
For example 1, 3, 5, 7 line to be gray, and 2,4,6,8 to be white.
Hi! I use RadCombobox in my WPF MVVM application. I use Prism 6 and Prism UserControl(WPF) where I set RadComboBox. This Prism UserControl(WPF) is in one of Prism module projects in the application solution but not in the Shell project. Below is declaration and creation of ObservableCollection in Model (I bind RadComboBox to this collection in View that is abovementioned Prism UserControl(WPF)):
public ObservableCollection<string> AvailableComPortsNames { get; set; }
this.AvailableComPortsNames = new ObservableCollection<string>(SerialPort.GetPortNames()); // in Model's constructor.
Below is declaration and creation of Model instance in ViewModel:
public ConnectionSettingsModel ConnectionSettingsModel
{
get { return this._connectionSettingsModel; }
set { this.SetProperty(ref this._connectionSettingsModel, value); }
}
this.ConnectionSettingsModel = new ConnectionSettingsModel(); // in ViewModel's constructor.
Below is View in a shortened form:
<UserControl x:Class="ConnectDisconnect.Views.ConnectionSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid>
. . . . . . . . . . .
<Label Grid.Row="0" Grid.Column="0" Content="Serial Port" HorizontalAlignment="Right"/>
<telerik:RadComboBox x:Name="radComboBox" HorizontalAlignment="Left" Margin="1,3,1,2" Grid.Row="0" Grid.Column="1"
VerticalAlignment="Top" Width="250" IsReadOnly="True"
ItemsSource="{Binding ConnectionSettingsModel.AvailableComPortsNames}" SelectedValue="{Binding SelectedComportName}"/>
</Grid>
Binding works good but the appearance of RadComboBox in runtime is very starnge. Please see attached files: 'RadCombobox_is_Closed.PNG' and 'RadCombobox_after_Element_Selection.PNG'. You can see there that RadComboBox has no marked border! Why? Help me solve this problem.
P.S. Just in case I display below ApplicationResources section of App.xaml file that is in the Shell project of application solution.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="views:Shell" BasedOn="{StaticResource RadWindowStyle}" />
</ResourceDictionary>
</Application.Resources>
Shell is RadWindow and the application solution was created as Telerik Empty Project. And Shell was added to the application after the application creation.
If I designed with RadDiagramShape, I can Add/Remove RadDiagramShape in RadDiagram, though.
How can I Visible or Hidden Children nodes in RadDiagram when Node were clicked?
I made some source code for diagram like this:
public class NodeBase : HierarchicalNodeViewModel
{
private long id;
public long Id
{
get { return id; }
set
{
if (id != value)
{
id = value;
this.OnPropertyChanged("Id");
}
}
}
...(Omit)...
}
public class LinkBase : LinkViewModelBase<HierarchicalNodeViewModel>
{
private eLinkTypes linkType;
public eLinkTypes LinkType
{
get { return linkType; }
set
{
if (linkType != value)
{
linkType = value;
this.OnPropertyChanged("LinkType");
}
}
}
...(Omit)...
}
public class FlowChartManager : ObservableGraphSourceBase<NodeBase , LinkBase>
{
public FlowChartManager()
{
PopulateGraphSource();
}
public FlowChartManager PopulateGraphSource()
{
//Add Nodes
NodeBase processNode1 = new NodeBase ()
{
Position = new Point(10, 10),
Content = "Process 1",
}; base.InternalItems.Add(processNode1);
NodeBase processNode2_1 = new NodeBase ()
{
Position = new Point(100, 100),
Content = "Process 2-1",
};
NodeBase processNode2 = new NodeBase ()
{
Position = new Point(100, 100),
Content = "Process 2",
};processNode2 .Children.Add(processNode2_1);
base.InternalItems.Add(processNode2);
NodeBase processNode3 = new NodeBase ()
{
Position = new Point(200, 200),
Content = "Process 3",
}; base.InternalItems.Add(processNode3);
//Add Links
base.InternalLinks.Add(new LinkBase(processNode1, processNode2) { LinkType = eLinkTypes.None, TargetCapType = Telerik.Windows.Diagrams.Core.CapType.Arrow1Filled });
}