Telerik Forums
UI for WPF Forum
1 answer
132 views
Hi I am having problems trying to bind the radChart to a ms access database. Does anyone have a solution?. Or just a short tutorial. I see none in this forum at all.
Ves
Telerik team
 answered on 06 May 2010
1 answer
93 views
Hi,

I try to create a Radcontrol WPF Project, but an error occur during creation.
You can see the detail of the error in the attached file.

Conf:
VS 2010 RTM
RadControl for WPF 2010.1.422

Kind regards.
Erjan Gavalji
Telerik team
 answered on 06 May 2010
1 answer
79 views
Hi,

I am trying to draw a line graph with two data series with each data series with about 80000 data points - that performs well? I find that after about 1000 data points it is a hog.

Is there anyway to create a line graph with 80K datapoints that is fairly quick? I don't need any frills on the chart - simple vanilla chart would be great.


thanks in advance,
Jas
Sia
Telerik team
 answered on 06 May 2010
1 answer
97 views
1. I have a column in my Grid. It is not allowed to use grouping for this column (IsGroupable="False" ). When I try to drag-drop the column-title to the GroupPanel it just does not do anything. And that is what is expected, but the"not-allowed-image" did not show up.
2. Another column in the Grid is allowed to use grouping. When I drag-drop the title to the GroupPanel everything works fine.
But... when I try to drag-drop the title back again, this also works, but now the "not-allowed-sign" shows up.

Should this not be the other way around: the "not-allowed-sign" shows when I try to group a column with IsGroupable="False"...?
Veselin Vasilev
Telerik team
 answered on 06 May 2010
1 answer
177 views
Hi

I have a small problem. When I validate a TextBoxes Value and than giving the User a visual feedback everything works prefectly fine.

When I do this with a RadComboBox, the only thing that works is the validation part. But I don't get any visual feedback. Here is the XAML part in my App.xaml

<Application x:Class="CDM.App" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
             xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
             > 
    <Application.Resources> 
    <Storyboard x:Key="FlashError"
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"  
                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/> 
                <DiscreteObjectKeyFrame KeyTime="00:00:05" Value="{x:Static Visibility.Hidden}"/> 
            </ObjectAnimationUsingKeyFrames> 
        </Storyboard> 
    <Style x:Key="myErrorTemplate" TargetType="Control"
        <Setter Property="Validation.ErrorTemplate"
            <Setter.Value> 
                <ControlTemplate> 
                    <StackPanel Orientation="Vertical"
                        <Border BorderBrush="Red" BorderThickness="1"
                            <AdornedElementPlaceholder Name="mycontrol"
 
                                <Label Foreground="White" Background="Red"  
                                           Content="{Binding ElementName=mycontrol,  
                                                     Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"> 
                                        <Label.Triggers> 
                                            <EventTrigger RoutedEvent="FrameworkElement.Loaded"
                                                <BeginStoryboard Storyboard="{StaticResource FlashError}" /> 
                                            </EventTrigger> 
                                        </Label.Triggers> 
                                    </Label> 
                            </AdornedElementPlaceholder> 
                        </Border> 
 
                        <!--<Label Foreground="White" Background="Red"  
                                           Content="{Binding ElementName=mycontrol,  
                                                     Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"> 
                        </Label>--> 
                    </StackPanel> 
                </ControlTemplate> 
            </Setter.Value> 
        </Setter> 
        <Style.Triggers> 
 
            <Trigger Property="Validation.HasError" Value="true"
                <Setter Property="ToolTip"  
                            Value="{Binding  
                                    RelativeSource={x:Static RelativeSource.Self}, 
                                    Path=(Validation.Errors)[0].ErrorContent}" /> 
            </Trigger> 
        </Style.Triggers> 
    </Style> 
 
      <Style TargetType="TextBox" BasedOn="{StaticResource myErrorTemplate}" /> 
    <Style TargetType="CheckBox" BasedOn="{StaticResource myErrorTemplate}" /> 
        <Style TargetType="telerik:RadComboBox" BasedOn="{StaticResource myErrorTemplate}" /> 
    </Application.Resources> 
</Application> 
 

And here the the C# Part for Validation. Allthough I am convincied that the validation works. Tested it several times.

    public Platten() 
        { 
            this.preisReference.AssociationChanged += new CollectionChangeEventHandler(preisReference_AssociationChanged); 
 
            this.AddError("preis""Preiscode fehlt!"); 
        } 
 
        void preisReference_AssociationChanged(object sender, CollectionChangeEventArgs e) 
        { 
            if (e.Action == CollectionChangeAction.Remove) 
            { 
                OnPropertyChanging("preis"); 
            } 
            else 
            { 
                if (e.Action == CollectionChangeAction.Add) 
                { 
                    this.RemoveError("preis"); 
                } 
                OnPropertyChanged("preis"); 
            } 
        } 
        #region IDataErrorInfo Members 
        private Dictionary<stringstring> m_validationErrors = new Dictionary<stringstring>(); 
 
        private void AddError(string columnName, string msg) 
        { 
            if (!m_validationErrors.ContainsKey(columnName)) 
            { 
                m_validationErrors.Add(columnName, msg); 
            } 
        } 
 
        private void RemoveError(string columnName) 
        { 
            if (m_validationErrors.ContainsKey(columnName)) 
            { 
                m_validationErrors.Remove(columnName); 
            } 
        } 
 
        public bool HasErrors 
        { 
            get { return m_validationErrors.Count > 0; } 
        } 
 
        public string Error 
        { 
            get 
            { 
                if (m_validationErrors.Count > 0) 
                { 
                    return "Customer data is invalid"
                } 
                else 
                { 
                    return null
                } 
            } 
        } 
 
        public string this[string columnName] 
        { 
            get 
            { 
                if (m_validationErrors.ContainsKey(columnName)) 
                { 
                    return m_validationErrors[columnName]; 
                } 
                else return null
            } 
        } 
        #endregion 


Thanks for your help.






Hristo
Telerik team
 answered on 06 May 2010
2 answers
136 views
Hi,
I added items to a treeview programmatically(with two for loop) and set the tag property to a value for each of an Child item.  But there is a problem.

 

 

 

RadTreeViewItem rti;

 

 

for (int i = 0; i < ParentCount; i++)

 

{

 

  rti =

new RadTreeViewItem();

 

  rti.Header = Parent[i].Name;

 

 

  for (int j = 0; j < ChildCount; j++)

 

    {

    rti.Items.Add(Child[j].Name);

 

    rti.Tag = Child[j].Number);

 

   

}

  MyRadTreeView.Items.Add(rti); //MyRadTreeView is declared at XAML code.

}

I want to reach rti's Tag property from any of an event(Selected, SelectionChange...), but none of these events give me the Tag property's value. The Tag's value comes with null. 
How can I achieve this issue?

EMRE ANDIC
Top achievements
Rank 1
 answered on 06 May 2010
1 answer
140 views

I was wondering how you would allow the user to resize the width of the Outlook Bar at runtime.  I am playing with the trial version of the controls and I did not see the ability to resize the outlook bar width once it is on the screen.  Do you need to pair this control with another Telerik control to get this functionality?  I basically want to set an initial width and give the user the ability to resize.  Please let me know if you have an example.   

Thanks, 
Joel
Valentin.Stoychev
Telerik team
 answered on 06 May 2010
5 answers
73 views
Hi ..

does GridView control works with .net 3.0, I know the demo requires .net3.5 but can we use the conrol with application that uses .net 3.0 not 3.5

Thanks
Wisam
Milan
Telerik team
 answered on 06 May 2010
7 answers
471 views
Hi everyone. I have problems on expanding the root node of the treeview at start. I do not use data binding and I have about 4 hierarhical levels. In code at runtime I call the ExpandAll() for the level 0 nodes but they do not expand. If I expand the level 0 nodes afterwards in the UI I can see that all other levels below are expanded.

farhan iqbal
Top achievements
Rank 1
 answered on 06 May 2010
4 answers
242 views
Hello.
I'm using Q1 2010 for WPF.

I have this following simple sample:
<Window x:Class="sample.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telNavigationControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:telControlsControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    xmlns:sample="clr-namespace:sample" 
    Title="Sample Window" Height="300" Width="300"
     
    <Window.Resources> 
 
        <Style x:Key="TelerikTabItemContainerStyle" TargetType="{x:Type telNavigationControls:RadTabItem}"
            <Setter Property="HeaderTemplate"
                <Setter.Value> 
                    <DataTemplate> 
                        <Button x:Name="closeButton" Content="Test Button" Height="25" sample:RoutedEventHelper.EnableRoutedClick="True"/> 
                    </DataTemplate> 
                </Setter.Value> 
            </Setter> 
        </Style> 
 
    </Window.Resources> 
     
    <Grid> 
        <telNavigationControls:RadTabControl x:Name="mainTabControl" ItemContainerStyle="{StaticResource TelerikTabItemContainerStyle}" > 
 
            <telNavigationControls:RadTabItem > 
                <telNavigationControls:RadTabItem.Content> 
                    <Button HorizontalAlignment="Center" VerticalAlignment="Center" Content="Test" IsDefault="True" /> 
                </telNavigationControls:RadTabItem.Content> 
            </telNavigationControls:RadTabItem> 
 
        </telNavigationControls:RadTabControl> 
    </Grid> 
</Window> 

As you can see, there is one RadTabControl with one RadTabItem. I've modified RadTabItem header through ItemContainerStyle. There is only one button in HeaderTemplate. I've used RoutedEventHandler class for allowing the button's click events to be catched.
Here is the code:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
 
using Telerik.Windows; 
using Telerik.Windows.Controls; 
 
namespace sample 
    class RoutedEventHelper 
    { 
        // TAB CLOSE BUTTON EVENT 
        public static readonly RoutedEvent TabCloseButtonPressedEvent = EventManager.RegisterRoutedEvent( 
            "TabCloseButtonPressed", 
            RoutingStrategy.Bubble, 
            typeof(RoutedEventHandler), 
            typeof(RoutedEventHelper)); 
 
        // DEPENDENCY PROPERTY FOR TAB ITEM HEADER BUTTON 
        public static readonly DependencyProperty EnableRoutedClickProperty = DependencyProperty.RegisterAttached( 
           "EnableRoutedClick", 
           typeof(bool), 
           typeof(RoutedEventHelper), 
           new PropertyMetadata(OnEnableRoutedClickChanged)); 
 
        // Add an attached property 
        public static bool GetEnableRoutedClick(DependencyObject obj) 
        { 
            return (bool)obj.GetValue(EnableRoutedClickProperty); 
        } 
 
        public static void SetEnableRoutedClick(DependencyObject obj, bool value) 
        { 
            obj.SetValue(EnableRoutedClickProperty, value); 
        } 
 
        // TAB EVENT HANDLER 
        private static void OnEnableRoutedClickChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) 
        { 
            var button = sender as Button; 
 
            if (button != null) 
                button.Click += CloseButton_Click; 
        } 
 
        private static void CloseButton_Click(object sender, RoutedEventArgs e) 
        { 
            var button = sender as Button; 
            if (button == null) return; 
 
            button.RaiseEvent(new RoutedEventArgs(TabCloseButtonPressedEvent, button)); 
        } 
    } 
 

Everything works fine with one exception. If I put another Button as RadTabItem Content (as you can see in the above xaml example) and I set property of this button "IsDefault = true", the click events from the first button in RadTabItem header are not fired.
Is this behavior correct ?

I have also second question:
Imagine almost the same situation as in the previous example. I've RadTabItem with modified HeaderTemplate with one button in it. I've no buttons in the RadTabItem Content, so when I click on Button in my RadTabItem header, the click event is fired correctly. 
Let's continue. Now I've got for example two RadTabItems (with the same HeaderTemplate) in one RadTabControl. The first RadTabItem is selected, the second one not. And now here it comes. When I click on the button (button in RadTabItem header) in the RadTabItem which is NOT selected, the event is not fired, only this specified RadTabItem becomes selected. So the click events are fired only when the RadTabItem is Selected.

The following behavior would be best for me: When I click on the button in header of arbitrary RadTabItem (selected or not) the click event of the button will be fired but the selection of the RadTabItems will NOT changed.

Is this scenario possible ? Or it would be great if at least the event of the buttons will be fired no matter the RadTabItem is selected or not.

Thank you a lot.

Stefan.



Ivan
Telerik team
 answered on 06 May 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?