Telerik Forums
UI for WPF Forum
2 answers
145 views
Hello
I'm binding a IList<BusinessObject> to the GridViewDataColumn through a converter.
Code snippet:

                          <telerik:GridViewDataColumn
                                                        Header="Classes"
                                                        Width="15*"
                                                        UniqueName="AuthorisationClasses"
                                                        DataMemberBinding="{Binding AuthorisationClasses, Converter={StaticResource AuthorisationClassesListConverter}}"

The view gets updated dynamically if I make the AuthorisationClasses an ObservableCollection. I was wondering if I could make the view update dynamically without making it an ObservableCollection. The reason being, AuthorisationClasses is a business entity and all the business entites in our solution are of type List<T>.
Thanks in advance

Regards
Binu
 
Binu Abraham
Top achievements
Rank 1
 answered on 05 Feb 2010
4 answers
126 views
Hello,
     I several checkbox columns on my grid and every once in a while a checkbox in one of the rows turns to the word True or False.
Usually when I scroll up or down it will change back to a checkbox but sometimes it won't and when I click on the checkbox that's changed the cell is protected. I have to close the app down. 
Jorge Gonzalez
Top achievements
Rank 1
 answered on 04 Feb 2010
2 answers
305 views
When the RadComboBox is in IsEditable mode, how do I set the MaxLength and CharacterCasing properties of the TextBox used for entering data?
Konstantina
Telerik team
 answered on 04 Feb 2010
10 answers
303 views
Hello,

The moment I try to edit the PaneHeader Style through Blend (Edit Style >create a copy), after putting the PaneHeader WPF component in a window.xaml, it returns "invalid xaml".. see screenshot.



I would like to make them blue, but have a hard time with the theming process.

would you have a custom colour theming of the Radpane working sample as described in the help documentation ?

Cheers
Konstantina
Telerik team
 answered on 04 Feb 2010
3 answers
120 views
Hi, Im using Prism + Wpf and trying to get the commanding to work on a button i have placed in the panel bar using a datatemplete. Here is a copy of the datatemplate:

<DataTemplate x:Key="RadPanelBarItemTemplate">
                <StackPanel Orientation="Vertical" Margin="1" HorizontalAlignment="Left">
                    <Button Width="140" Height="25" Margin="2"
                            Tag="{Binding Tag}"
                            Content="{Binding Title}"
                            ToolTip="{Binding Description}"
                            commands:Click.Command="{Binding NavigationBarClickCommand}"
                            commands:Click.CommandParameter="{Binding Tag}"/>
                </StackPanel>
            </DataTemplate>

Is this possible, at the moment my command is never getting fired. Or should I be using a different approach?

Thanks, Mark


Tihomir Petkov
Telerik team
 answered on 04 Feb 2010
3 answers
227 views
Hi,

i try to render WPF content with telerik chart-controls in VB6. This is possible if you are using the Microsoft Interop Forms Toolkit (http://msdn.microsoft.com/en-us/vbasic/bb419144.aspx). If i'm using the 2D controls everiting is fine. But if I switch to 3D I get a OutOfMemoryException or NullReferenceException.

Here is my XAML:
<UserControl x:Class="UserControl1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:charts="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting">  
    <Grid> 
        <charts:RadChart x:Name="MyChart"/>  
    </Grid> 
</UserControl> 
 

This is the code-behind from the 2D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New BarSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
    End Sub 
 

And here is the code-behind from the 3D version:
    Public Sub New()  
 
        ' This call is required by the Windows Form Designer.  
        InitializeComponent()  
 
        ' Add any initialization after the InitializeComponent() call.  
        MyChart.DefaultSeriesDefinition = New Bar3DSeriesDefinition  
 
        Dim itemSource As Double() = {5, 9, 17, 10, 11, 3, 12}  
        MyChart.ItemsSource = itemSource  
 
        AddHandler MyChart.DefaultView.ChartArea.Loaded, AddressOf Me.RadChart_Loaded  
 
    End Sub 
 
    Private Sub RadChart_Loaded(ByVal sender As ObjectByVal e As RoutedEventArgs)  
 
        Dim camera As New CameraExtension  
        camera.SpinAxis = SpinAxis.XY  
        camera.ZoomEnabled = True 
 
        MyChart.DefaultView.ChartArea.Extensions.Add(camera)  
 
    End Sub 

The same code works in a normal .NET-project and also in a WinForms-project on the ElementHost.

Best regards,
Dimi
Dimi
Top achievements
Rank 1
 answered on 04 Feb 2010
3 answers
686 views
Good Morning,

I have been working with the WPF demo/code.  It uses 

Telerik.Windows.QuickStart.dll extensively and I cannot track what is being done.  It hides many aspects, such as page transfers and returns.  Is there a place where I can see what is going on?

Take Care,
Dave

Hristo
Telerik team
 answered on 04 Feb 2010
2 answers
158 views
Hi all. I was wondering if it's possible to show the list of items in a RadComboBox by using a RadGridView. In other words, that when the user expands the RadComboBox, the items inside get shown in a RadGridView (with headers). I need this because I got a lot of info to show for each element (item) of the RadComboBox.

Thanks.

Hugo Aristizabal.
Hugo Aristizabal
Top achievements
Rank 2
 answered on 04 Feb 2010
1 answer
172 views
Hello

I have the setup as described below. I use the trial version binaries 2009.3.1314.35.
If you run this example and try to insert a new row by pressing the 'insert'-Key, then you result in an ArgumentException:
{"Property with specified name:  cannot be found on type: WpfApplication1.SimpleObject\r\nParameter name: propertyName"}.

The problem seems to be the 'SimpleObject'-Class. If you remove, or comment out, the ICustomTypeDescriptor interface from the class declaration then everything works ok.

Do you know this problem? Is there a solution or a work around?

Best regards,
Franziska

xaml:
<telerik:RadGridView x:Name="gridView"  
                                     ShowGroupPanel="False" IsFilteringAllowed="False" AutoGenerateColumns="False" 
                                     ItemsSource="{Binding PmodCollection}"  
                                     AddingNewDataItem="gridView_AddingNewDataItem" > 
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn Header="Test" DataMemberBinding="{Binding Test}" /> 
                <telerik:GridViewComboBoxColumn UniqueName="columnDescriptor" Header="Descriptor" 
                                                        DataMemberBinding="{Binding SimpleObject}" DisplayMemberPath="Descriptor" 
                                                        ItemsSource="{Binding SimpleObjChoiceList}"/> 
            </telerik:RadGridView.Columns> 
</telerik:RadGridView> 
Code behind:
public partial class Window1 : Window 
        public Window1() 
        { 
            InitializeComponent(); 
 
            this.DataContext = new DataContext(); 
        } 
 
        private void gridView_AddingNewDataItem(object sender, GridViewAddingNewEventArgs e) 
        { 
            e.NewObject = new SimpleObjectPMod(); 
        } 
DataContext:
class DataContext 
        private List<SimpleObject> simpleObjs; 
        private ObservableCollection<SimpleObjectPMod> pmodCollection; 
 
        public DataContext() 
        { 
            simpleObjs = new List<SimpleObject>(); 
            simpleObjs.Add(new SimpleObject() { Descriptor = "bla" }); 
            simpleObjs.Add(new SimpleObject() { Descriptor = "fasel" }); 
 
            pmodCollection = new ObservableCollection<SimpleObjectPMod>(); 
        } 
 
        public List<SimpleObject> SimpleObjChoiceList 
        { 
            get { return simpleObjs; } 
        } 
 
        public ObservableCollection<SimpleObjectPMod> PmodCollection 
        { 
            get { return pmodCollection; } 
        } 
PMod:
class SimpleObjectPMod 
        public string Test 
        { 
            get; set; 
        } 
 
        public SimpleObject SimpleObject 
        { 
            get; set; 
        } 
Simple Object:
class SimpleObject : ICustomTypeDescriptor
{
        public string Descriptor
        {
            get; set;
        }

        #region Implementation of ICustomTypeDescriptor
        public AttributeCollection GetAttributes()
        {
            return TypeDescriptor.GetAttributes(this, true);
        }
        public string GetClassName()
        {
            return TypeDescriptor.GetClassName(this, true);
        }
        public string GetComponentName()
        {
            return TypeDescriptor.GetComponentName(this, true);
        }
        public TypeConverter GetConverter()
        {
            return TypeDescriptor.GetConverter(this, true);
        }
        public EventDescriptor GetDefaultEvent()
        {
            return TypeDescriptor.GetDefaultEvent(this, true);
        }
        public PropertyDescriptor GetDefaultProperty()
        {
            return TypeDescriptor.GetDefaultProperty(this, true);
        }
        public object GetEditor(Type editorBaseType)
        {
            return TypeDescriptor.GetEditor(this, editorBaseType, true);
        }
        public EventDescriptorCollection GetEvents()
        {
            return TypeDescriptor.GetEvents(this, true);
        }
        public EventDescriptorCollection GetEvents(Attribute[] attributes)
        {
            return TypeDescriptor.GetEvents(this, attributes, true);
        }
        public PropertyDescriptorCollection GetProperties()
        {
            return GetProperties(null);
        }
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            return TypeDescriptor.GetProperties(this, attributes, true);
        }
        public object GetPropertyOwner(PropertyDescriptor pd)
        {
            return this;
        }
        #endregion
}
Nedyalko Nikolov
Telerik team
 answered on 04 Feb 2010
1 answer
146 views
Hi,

I am using the DatePicker as an usercontrol and in the Constructor of the Cntrol I am setting the following dates.

dateCtrl.DisplayDateStart = Convert.ToDateTime("01/01/2003", System.Globalization.CultureInfo.CurrentCulture);                        dateCtrl.DisplayDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture); 
dateCtrl.SelectableDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);                        
dateCtrl.SelectedDate = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);

and while loading the control it throws the following exception:

System.ArgumentOutOfRangeException was unhandled
  Message="Invalid DisplayDateEnd value.\r\nParameter name: sender"
  Source="Telerik.Windows.Controls.Input"
  ParamName="sender"
  StackTrace:
       at Telerik.Windows.Controls.RadCalendar.OnDisplayDateEndChanged(DependencyObject sender, 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, OperationType operationType)
       at System.Windows.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot)
       at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot)
       at System.Windows.StyleHelper.LoadOptimizedTemplateContent(DependencyObject container, ParserContext parserContext, OptimizedTemplateContent optimizedTemplateContent, FrameworkTemplate frameworkTemplate, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
       at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
       at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
       at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
       at System.Windows.FrameworkElement.ApplyTemplate()
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       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.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(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 ITV.MSS.Shell.App.Main() in E:\MediaSales\MediaSalesSuite\Dev\Shell\ITV.MSS.Shell.Shell\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:



If I Comment the following lines Or Set the DisplayDateEnd to DateTime.Now() then it works fine.

dateCtrl.DisplayDateStart = Convert.ToDateTime("01/01/2003", System.Globalization.CultureInfo.CurrentCulture);                       
//dateCtrl.DisplayDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture); 
dateCtrl.SelectableDateEnd = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);                        
dateCtrl.SelectedDate = Convert.ToDateTime("18/01/2010", System.Globalization.CultureInfo.CurrentCulture);

Please let me know what can be the possible cause of this exception.

Thanks,
Anjan
Konstantina
Telerik team
 answered on 04 Feb 2010
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
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?