Telerik Forums
UI for WPF Forum
1 answer
146 views
Is it possible to defer the filtering until some point, suchas when the DataFilter loses focus?
Thanks in advance,
Steve
Dimitrina
Telerik team
 answered on 22 Nov 2012
0 answers
113 views

Hello,

Is it possible to bind two comboboxes to one table with composite primary key?

Suppose one has a table MyTable with two fields (int Level, varchar2 Code) which forms composite primary key.

The corresponding entity is

public class MyTable
{
   public MyEnum Level {get; set;}
   public string Code {get; set;}
}

where MyEnum is some enum.

I would like to bind two comboboxes to the list of such entities so that one combobox shows list of available items of MyEnum,

and the other one list of codes corresponding to the selected Level. Is it possible?

Thanks in advance.

Yours faithfully,

Mikhail.

MuxMux
Top achievements
Rank 1
 asked on 22 Nov 2012
2 answers
174 views
Hi,
I'm trying to show a RadGridView with a RadChart in each row.
Binding the grid's ItemSource to the relevant property works, all charts show the data labels,
However, only the last row's chart shows the actual value heights (see attached image).

Another issue is the commented ChartArea.AxisX. uncommenting this property section causes an NullReferenceException to be thrown from Telerik.Windows.Controls.Charting.AxisX.CalculateItemRange(DataSeries dataSeries, Int32 index)

Window1.xaml:
<Window x:Class="testApp.Window1"
        xmlns:my="clr-namespace:testApp"
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
        xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
        xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
        Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <my:Window1ViewModel x:Key="MyViewModel"/>
    </Window.Resources>
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource MyViewModel}">
        <telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Label}"/>
                <telerik:GridViewDataColumn Header="Values">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerikChart:RadChart ItemsSource="{Binding Values}"
                                                           UseDefaultLayout="False" MaxWidth="200" MaxHeight="100">
                                <telerikCharting:ChartArea x:Name="MyChartArea">
                                    <telerikCharting:ChartArea.AxisY>
                                        <telerikCharting:AxisY/>
                                    </telerikCharting:ChartArea.AxisY>
                                    <!--<telerikCharting:ChartArea.AxisX>
                                        <telerikCharting:AxisX/>
                                    </telerikCharting:ChartArea.AxisX>-->
                                </telerikCharting:ChartArea>
                                <telerikChart:RadChart.SeriesMappings>
                                    <telerikCharting:SeriesMapping ChartAreaName="MyChartArea">
                                        <telerikCharting:SeriesMapping.SeriesDefinition>
                                            <telerikCharting:LineSeriesDefinition LegendDisplayMode="None"/>
                                        </telerikCharting:SeriesMapping.SeriesDefinition>
                                        <telerikCharting:SeriesMapping.ItemMappings>
                                            <telerikCharting:ItemMapping DataPointMember="YValue"/>
                                        </telerikCharting:SeriesMapping.ItemMappings>
                                    </telerikCharting:SeriesMapping>
                                </telerikChart:RadChart.SeriesMappings>
                            </telerikChart:RadChart>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
</Window>

Window1ViewModel.cs:
using System.Collections.Generic;
using System.Collections.ObjectModel;
 
namespace testApp
{
  class Window1ViewModel
  {
    public ObservableCollection<ItemsClass> Items { get; set; }
 
    public Window1ViewModel()
    {
      Items = new ObservableCollection<ItemsClass>
              {
                new ItemsClass("Test1", new[] {0.1, 0.3, 0.5, 0.2}),
                new ItemsClass("Test2", new[] {0.2, 0.3, 0.5, 0.2}),
                new ItemsClass("Test3", new[] {0.3, 0.3, 0.5, 0.2})
              };
    }
  }
 
  public class ItemsClass
  {
    public string Label { get; set; }
    public IEnumerable<double> Values { get; set; }
 
    public ItemsClass(string label, IEnumerable<double> values)
    {
      Label = label;
      Values = values;
    }
  }
}

Any idea?
Thanks,
Edo
Edo
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
150 views
Hi,

I'm trying to mimic the autocomplete behavior of Excel in a GridView. For this, I have DataBoundColumns, and replaced the CellEditTemplate with an AutoCompleteBox (ACB).
<telerik:GridViewDataColumn DataMemberBinding="{Binding ItemContent}">
    <telerik:GridViewDataColumn.CellEditTemplate>
        <DataTemplate>
            <telerik:RadAutoCompleteBox
                ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView, AncestorLevel=1}, Path=DataContext.ListOfItemContent}"
        />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

The not-so-simple ACB ItemsSource binding is for an MVVM approach, trying to reach the VM for the GridView.
My questions:
  • Is there an easier way to do this? (for example, the ComboBoxColumn has ItemsSource and ItemsSourceBinding)
  • What is the "Text" property for an ACB? (Can't find one, and the on-line documentation is a bit scarce for this control...)
  • Could you make a new GridColumn type, that would use /inherit from/ ACB? (like the special ones you already have)

According to this thread, the Text property would be the SearchText property, and it has some issues:

http://www.telerik.com/community/forums/wpf/autocompletebox/setting-the-searchtext.aspx
I can reproduce the same exception with the above code. The ListOfItemContent is the list of strings in the current column. It's in the VM.

public IEnumerable<string> ListOfItemContent
{
  get
  {
    return
      (from i in this.MyBusinessObjects
      select i.ItemContent).Distinct();
  }
}

Thank you,
Gyula

Ivo
Telerik team
 answered on 22 Nov 2012
6 answers
247 views
Is there a roadmap for improving the exporting features of this grid? If so can you please point me to it? Im curious as to what to expect from future release in regards to exporting which is one of our most important end user requirements.
Makarand
Top achievements
Rank 1
 answered on 22 Nov 2012
2 answers
103 views
When updating values of like 1000 cells every 500ms (for example), the UI would lock.
I also did this experiment with 100ms update rate, and the grid was not able to handle it.

The reason I'm checking it is because in my project, I'm connected to a remote hardware from which I read a byte array that represents the data of the cells.
I already wrote the mechanism that knows which rows are visible and therefore reads only the byte array that corresponds the visible rows.
Updating values on none visible rows should almost have no affect because of the UI virtualization.
I know that there is a chance that some cells on the DataTable (my ItemsSource) will not have their value changed on the remote hardware (and in this case I can optimize my code, so it won't overwrite the value, to prevent notification to the UI), but in my example, I'm taking the worst case scenario....


I have decided to check it with some more data grids.

Syncfusion - Almost the same poor performances.
Component One FlexGird - Good performance but lots of bugs (values doesn't get updated after scroll etc).
Micorsoft DataGrid - Good performance
ListView with GridView - Very good performance.


Another thing, GroupRenderMode="Flat" should increase the scroll performance (at least from what your documentation says), but it actually makes it worse!


Is there a better way of doing what I do? (Is there a way of getting the performance at least near the ListView or the DataGrid?)
Thanks.


I'm unable to attach the solution, but here is the code:

    public abstract class ViewModelBase : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
 
        public void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
 
 
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Threading.Tasks;
using System.Threading;
 
namespace WpfGridsPerformanceTest
{
    public class MainViewModel : ViewModelBase
    {
        private MyDT _data;
        private DelegateCommand _changeValuesCommand;
 
        public MainViewModel()
        {
            _data = new MyDT();
 
            for (int i = 0; i < 400; i++)
            {
                DataRow row = _data.NewRow();
                _data.Rows.Add(row);
            }
        }
 
        public DataView Items
        {
            get
            {
                return _data.DefaultView;
            }
        }
 
        public DelegateCommand ChangeValuesCommand
        {
            get
            {
                if (_changeValuesCommand == null)
                {
                    _changeValuesCommand = new DelegateCommand(changeValues);
                }
 
                return _changeValuesCommand;
            }
        }
 
        private void changeValues()
        {
            Task t = new Task(() =>
            {
                while (true)
                {
                    foreach (DataRow row in _data.Rows)
                    {
                        for (int i = 0; i < row.ItemArray.Count(); i++)
                        {
                            row[i] = (int)row[i] + 1;
                        }
                    }
 
                    Thread.Sleep(500);
                }
            });
 
            t.Start();
        }
    }
}
 
 
 
<Window x:Class="WpfGridsPerformanceTest.MainWindow"
        xmlns:local="clr-namespace:WpfGridsPerformanceTest"
        Title="MainWindow" Height="350" Width="525" WindowState="Maximized">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
 
        <local:Telerik />
         
        <!--<local:Syncfusion />-->
         
        <!--<local:DataGrid />-->
         
        <!--<local:ListView />-->
        <Button Grid.Row="1" FontWeight="Bold" FontSize="16" Command="{Binding ChangeValuesCommand}">Click to start changing values</Button>
    </Grid>
</Window>
 
 
 
 
 
 
 
 
 
<UserControl x:Class="WpfGridsPerformanceTest.Telerik"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerik:RadGridView ItemsSource="{Binding Items}"
                             ShowGroupPanel="False"
                             UseLayoutRounding="False"
                             RowIndicatorVisibility="Collapsed"
                             DataLoadMode="Synchronous"
                             CanUserFreezeColumns="False"
                             CanUserSortColumns="False"
                             CanUserSelect="True"
                             SelectionMode="Single"
                             SelectionUnit="FullRow" />
    </Grid>
</UserControl>
BENN
Top achievements
Rank 1
 answered on 22 Nov 2012
2 answers
378 views
Hi,
   I have decimal values in telerik grid view data column, i formatted it and showing properly but when i try to edit the value and double click on it, it displays a bunch of zeros after the decimal point.Now i want to remove all those zeros when i double click for editing.Can anybody please help me out on this as soon as possible?
Jippy
Top achievements
Rank 1
 answered on 22 Nov 2012
2 answers
128 views
Hi,

I'm having issues with RadWindow Predefined Dialogs when stepping through code.

Whenever I call Predefined Dialogs such as RadWindow.Alert(), I find that the window falls behind the calling window becoming inaccessible and thus I am unable to confirm the dialog window and the application has to be restarted.

Can anyone else confirm this behaviour when stepping through code?
If I let the code run as normal, i.e. by not stepping through the code then everything works fine.

Thanks for your time,

Rob
Robert
Top achievements
Rank 1
 answered on 21 Nov 2012
5 answers
208 views
Hello,







if I try to clear the PropertyDefinitons Collection via Clear-Method, I get a Specified argument was out of the range of valid values Exception. StackTrace:



   at MS.Internal.Data.IndexedEnumerable.get_Item(Int32 index)



   at MS.Internal.Data.CollectionViewProxy.GetItemAt(Int32 index)



   at System.Windows.Controls.ItemCollection.GetItemAt(Int32 index)



   at System.Windows.Controls.ItemCollection.get_Item(Int32 index)



   at System.Windows.Controls.ItemContainerGenerator.Generator.GenerateNext(Boolean stopAtRealized, Boolean& isNewlyRealized)



   at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.GenerateNext()



   at System.Windows.Controls.Panel.GenerateChildren()



   at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)



   at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)



   at System.Windows.Controls.ItemContainerGenerator.OnRefresh()



   at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)



   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)



   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)



   at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)



   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)



   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)



   at System.Windows.Controls.ItemCollection.OnViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)



   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)



   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 MS.Internal.Data.CollectionViewProxy._OnViewChanged(Object sender, NotifyCollectionChangedEventArgs args)



   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)



   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 959



   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1106



   at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1055



   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer() in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1049



   at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1394



   at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1340



   at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1817



   at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Collections\QueryableCollectionView.cs:line 1797



   at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\WeakEvents\WeakEvent.cs:line 33



   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)



   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)



   at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()



   at System.Collections.ObjectModel.Collection`1.Clear()



   at ChartEditor.Editors.Drawing.PropertyPane.WorkspaceSelectionChanged(Object sender, EventArgs eventArgs) in c:\Users\Martin\Documents\Visual Studio 2012\Projects\ChartEditor\ChartEditor\Editors\Drawing\PropertyPane.xaml.cs:line 33



   at ChartEditor.Workspace.set_SelectedItem(IDrawingItem value) in c:\Users\Martin\Documents\Visual Studio 2012\Projects\ChartEditor\ChartEditor\Workspace.cs:line 142



   at ChartEditor.Editors.Drawing.ItemExplorer.WorkspaceSelectionChanged(Object sender, RoutedPropertyChangedEventArgs`1 e) in c:\Users\Martin\Documents\Visual Studio 2012\Projects\ChartEditor\ChartEditor\Editors\Drawing\ItemExplorer.xaml.cs:line 91



   at System.Windows.RoutedPropertyChangedEventArgs`1.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 e)



   at System.Windows.Controls.TreeView.OnSelectedItemChanged(RoutedPropertyChangedEventArgs`1 e)



   at System.Windows.Controls.TreeView.ChangeSelection(Object data, TreeViewItem container, Boolean selected)



   at System.Windows.Controls.TreeViewItem.Select(Boolean selected)



   at System.Windows.Controls.TreeViewItem.OnGotFocus(RoutedEventArgs e)



   at System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)



   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)



   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)



   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)



   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)



   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)



   at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)



   at System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)



   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)



   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)



   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)



   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)



   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)



   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)



   at System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)



   at System.Windows.Input.KeyboardNavigation.UpdateFocusedElement(DependencyObject focusTarget)



   at System.Windows.FrameworkElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)



   at System.Windows.Input.KeyboardFocusChangedEventArgs.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.RaiseTrustedEvent(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.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)



   at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)



   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)



   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)



   at System.Windows.UIElement.Focus()



   at System.Windows.Controls.TreeViewItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)



   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)



   at System.Windows.UIElement.OnMouseDownThunk(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.RaiseTrustedEvent(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, WindowMessage 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, Int32 numArgs)



   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)



   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)



   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 ChartEditor.App.Main() in c:\Users\Martin\Documents\Visual Studio 2012\Projects\ChartEditor\ChartEditor\obj\Debug\App.g.cs:line 0



   at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)



   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)



   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)



   at System.Threading.ThreadHelper.ThreadStart()







XAML-Declaration:

<telerik:RadPropertyGrid x:Name="_properties" Item="{Binding Path=Workspace.SelectedItem, ElementName=PropertyPaneControl}" AutoGeneratePropertyDefinitions="False" LabelColumnWidth="Auto" />





What's my error? The following Workaround works, but the Clear-Method would be nicer:

// clear properties

for (int i = _properties.PropertyDefinitions.Count; i > 0; i--)

_properties.PropertyDefinitions.RemoveAt(i-1);

Ivan Ivanov
Telerik team
 answered on 21 Nov 2012
1 answer
103 views
Hi,

i'm using a RadPanelBar and a RadTabControl. Each RadPanelBarItem Add a RadTabItem. The Problem is, each PanelBarItem has
a different Template.

Example:
<telerik:RadPanelBaritem Header="Customer" />
Layout for the RadTabItem colud be a Grid .... with its own ViewModel (CustomerViewModel)

<telerik:RadPanelBaritem Header="Company" />
Layout for tje RadTabitem could be a Stackpanel. ... with it's own VieModel (CompanyViewModel)
...
...

How do i create a New TabItem  with different Templates?

Thanks
Best Regards
Rene
Pavel R. Pavlov
Telerik team
 answered on 21 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?