Telerik Forums
UI for WPF Forum
1 answer
116 views
I see there are descriptions in the docs/examples on how to do a programmatic initial sort. Is there a way to do a declarative initial sort?
I can't seem to get that to work.
Vlad
Telerik team
 answered on 02 Feb 2009
1 answer
87 views
I have a collection which contains two properties
1. ABC
2. XYZ

I want to make XYZ as the child of ABC For example:

.ABC1
    .XYZ1
    .XYZ2
.ABC2
    .XYZ3
    .XYZ4

I want to bind this in .XAML.CS page

Currently what I have done in XAML

 

<Telerik:RadTreeView x:Name="RadTreeView" DockPanel.Dock="Bottom"/>

 

 


In XAML.CS page
Collection is CommodityCollection

RadTreeViewItem

aa;

 

 

 

 

 

for (int i = 0; i < CommodityCollection.Count; i++) {

 

aa = new RadTreeViewItem();

 

 

 aa.Header = CommodityCollection[i].ABC;

 

this.RadTreeView.Items.Add(aa);


Now my problem is How to add child node in the RadTreeView?

 

 





Valentin.Stoychev
Telerik team
 answered on 30 Jan 2009
4 answers
141 views
Hi..
What event is fired when the carousel is 'moved' either by MoveBy or using the Horiz/Vertical  scrollbars?
Can the scrollbars be customized?
Thanks again.!
Nor
Top achievements
Rank 1
 answered on 29 Jan 2009
1 answer
205 views
Hi,
I've created a simple solution to test the RadTreeview.It just initializes a new ObservableCollection of Items like this:
 /// <summary> 
    /// Interaction logic for Window1.xaml 
    /// </summary> 
    public partial class Window1 : Window 
    { 
        public ObservableCollection<Item> Items 
        { 
            get { return (ObservableCollection<Item>)GetValue(ItemsProperty); } 
            set { SetValue(ItemsProperty, value); } 
        } 
 
        // Using a DependencyProperty as the backing store for Items.  This enables animation, styling, binding, etc... 
        public static readonly DependencyProperty ItemsProperty = 
            DependencyProperty.Register("Items"typeof(ObservableCollection<Item>), typeof(Window1)); 
 
        public Window1() 
        { 
            InitializeComponent(); 
            Items = new ObservableCollection<Item>(); 
 
            Items.Add(new Item("Item 1")); 
            Items.Add(new Item("Item 2")); 
            Items.Add(new Item("Item 3")); 
        } 
    } 
 
    public class Item 
    { 
        public string Header { getset; } 
        public ObservableCollection<Item> Items { getset; } 
 
        public Item(string header) 
        { 
            Header = header; 
            Items = new ObservableCollection<Item>(); 
        } 
    } 

and in xaml created a simple HierarchicalDataTemplate:
<Window.Resources> 
        <HierarchicalDataTemplate x:Key="NodeTemplate" ItemsSource="{Binding Path=Items}"
            <StackPanel Orientation="Horizontal"
                <TextBlock Text="{Binding Path=Header}"/> 
            </StackPanel> 
        </HierarchicalDataTemplate> 
    </Window.Resources> 
    <Grid> 
        <Telerik:RadTreeView IsDragDropEnabled="True" Name="t"  
                             ItemsSource="{Binding Path=Items, ElementName=window}"  
                             ItemTemplate="{StaticResource NodeTemplate}"
        </Telerik:RadTreeView> 
    </Grid> 

Now, when I am trying to drag "Item 1" to, lets say, "Item 2" it works ok. But if afterwards I am trying to drag "Item 3" to "Item 1" (that is now under "Item 2") I am getting a NullReferenceException with the following stack trace:
   at Telerik.Windows.Controls.RadTreeViewItem.CheckStatePropertyChangedConstrainValue(DependencyObject d, Object newValue) 
   at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean skipBaseValueChecks) 
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) 
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) 
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) 
   at Telerik.Windows.Controls.RadTreeViewItem.set_CheckState(ToggleState value) 
   at Telerik.Windows.Controls.RadTreeViewItem.SetCheckStateWithNoPropagation(ToggleState state) 
   at Telerik.Windows.Controls.RadTreeViewItem.Render(Boolean recursive) 
   at Telerik.Windows.Controls.RadTreeViewItem.OnItemsChanged(NotifyCollectionChangedEventArgs e) 
   at System.Windows.Controls.ItemsControl.OnItemCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) 
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e) 
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list) 
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args) 
   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex) 
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) 
   at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) 
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) 
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item) 
   at System.Collections.ObjectModel.Collection`1.Add(T item) 
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Add(Object value) 
   at Telerik.Windows.Controls.RadTreeView.EndDrag() 
   at Telerik.Windows.Controls.RadTreeView.HandleMouseUp(MouseEventArgs e) 
   at Telerik.Windows.Controls.RadTreeView.RadTreeView_MouseLeftButtonUp(Object sender, MouseEventArgs e) 
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) 
   at System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e) 
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) 
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) 
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) 
   at System.Windows.Input.InputManager.ProcessStagingArea() 
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) 
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) 
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) 
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) 
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg) 
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) 
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) 
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) 
   at System.Windows.Threading.Dispatcher.Run() 
   at System.Windows.Application.RunDispatcher(Object ignore) 
   at System.Windows.Application.RunInternal(Window window) 
   at System.Windows.Application.Run(Window window) 
   at System.Windows.Application.Run() 
   at Telerik.App.Main() in C:\Documents and Settings\talg\Desktop\TreeViewDrag\Telerik\Telerik\obj\Debug\App.g.cs:line 0 
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
   at System.Threading.ThreadHelper.ThreadStart() 

To make things even worse, it's not constant. It happens in about 50% of the tries.
Thank you in advance,
Tal
Ivan
Telerik team
 answered on 29 Jan 2009
1 answer
192 views
Just installed WPF with VS2008.
Want to get GridView to work.
I installed the .dlls in the toolbox as described here: http://www.telerik.com/help/wpf/adding-radcontrols-to-vs-toolbox.html

The following is what I pieced together from the online demo:

<Page x:Class="TestGridViewAggregate.Page1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    Title="Page1">
    <Grid>
       <telerik:RadGridView></RadGridView>
    </Grid>
</Page>

However, it gives me the error:
"The tag 'RadGridView' does not exist in XML namespace clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView'"
Vlad
Telerik team
 answered on 28 Jan 2009
1 answer
114 views
Hi! Is it possible to change sort logic for grid? For example user apply sorting by some column, but i need to leave one row unsorted (in the end of list).
Vlad
Telerik team
 answered on 28 Jan 2009
1 answer
139 views
Hi,
I am looking for a vertical navigator control like the navigator on the telerik site or many other sites. I found PanelBar, but Implements this control ICommandSource, so I am able to associate ICommand items with it??
Can I load the content via data binding?

With best regards

Gerhard
Tihomir Petkov
Telerik team
 answered on 27 Jan 2009
1 answer
1.5K+ views
Hello!

Currently i am working on an application wich needs two datepickers - a StartDate and an EndDate . I am having problems binding this two controls with DateTime properties on an object . For binding values i am using the attribute SelectedDate = {Binding Path=StartDate}, but no binding is created . I would like to know if this is the correct way of binding this control to date fields or if there is another way of doing this... I have search throught the website/documentation but I can't find a proper response.

Any help would be great !
Thanks,
Ivan Frias.

Miroslav Nedyalkov
Telerik team
 answered on 27 Jan 2009
1 answer
400 views
Hi !
I would like to know if it's possible to define the initial date, some sort of default value for this control . I have searched through the properties list and I can't find it .Also I searched through the documentation and found nothing ..
Hope you could help, with an example or point me to the right direction .

Thanks,
Ivan Frias
Miroslav Nedyalkov
Telerik team
 answered on 27 Jan 2009
1 answer
94 views
I have a radcarousel bound to an objectdataprovider which has an instance of an observablecollection<T> where T is a personentity class in my system. If I change a property value of one of the personentity (like firstname) those changes are not reflected in the Carousel. Any help will be much appreciated.

Matt Francis
Top achievements
Rank 1
 answered on 26 Jan 2009
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?