Telerik Forums
UI for WPF Forum
9 answers
212 views
Hi,

i have this xml File:

<?xml version="1.0" encoding="utf-8" ?>
<MODULE>
    <Content>
        <ContentItems>
            <ContentItem>
                <ContentCategoryName>Mandanten</ContentCategoryName>
                <Attributes>
                    <Attribute AttributeGroup="Mandant">
                        <ContentAttribute AttributeName="Name">ERP</ContentAttribute>
                        <ContentAttribute AttributeName="Host">okljkj</ContentAttribute>
                        <ContentAttribute AttributeName="Port">6550</ContentAttribute>
                        <ContentAttribute AttributeName="mandant">eks</ContentAttribute>
                        <ContentAttribute AttributeName="pw">lolo</ContentAttribute>
                    </Attribute>
                </Attributes>
            </ContentItem>
            <ContentItem>
                <ContentCategoryName>Mandanten</ContentCategoryName>
                <Attributes>
                    <Attribute AttributeGroup="Mandant">
                        <ContentAttribute AttributeName="Name">DEMO</ContentAttribute>
                        <ContentAttribute AttributeName="Host">jhkhjk</ContentAttribute>
                        <ContentAttribute AttributeName="Port">6551</ContentAttribute>
                        <ContentAttribute AttributeName="mandant">demo</ContentAttribute>
                        <ContentAttribute AttributeName="pw">lolo</ContentAttribute>
                    </Attribute>
                </Attributes>
            </ContentItem>
        </ContentItems>
    </Content>
</MODULE>

and i don't now how to bind this File to an Combobox: How must the XMLDataProvider and the ComboboxItem look like?

Thanks for helping me.
Best Regrads
Rene
Hristo
Telerik team
 answered on 06 Jul 2011
1 answer
195 views
Is there a way to easily change the quarter numbering to align based on a fiscal calendar vs "calendar" year? 

Thanks,
Shawn
Missing User
 answered on 06 Jul 2011
2 answers
222 views
Hi,
i have spent the last two days two find out how the validation works in the dataform. My DAL uses Entity Framework 4.1 with auto generated POCO Entities (in a seperate Assembly).
I'm working with MVVM and have UserControls for my views. One UserControl has a RadDataFrom with customized fields. The currentItem is bound to a an instance of my POCO Entities. Now i'd like to use DataAnnotations in the entities for my validatioin. But the error are not displayed in the dataform. I don't know what i'm doing wrong, can you please help me?
Here is the UserControl containing the dataform and the corresponding POCO:

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="MiexProto.Views.EmployeeFormView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             x:Name="me"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate x:Key="EmployeeTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
                    <Label Content="Anrede"/>
                    <telerik:DataFormComboBoxField Height="auto"  DataMemberBinding="{Binding AnredeId, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" SelectedValuePath="AnredeId" DisplayMemberPath="Bezeichnung" ItemsSource="{Binding ElementName=me, Path=DataContext.ListAnrede}" />
                </StackPanel>
                <StackPanel Orientation="Horizontal"  Grid.Row="0" Grid.Column="1">
                    <Label Content="Titel" />
                    <telerik:DataFormComboBoxField Height="Auto" DataMemberBinding="{Binding Titel.Bezeichnung, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" DisplayMemberPath="Bezeichnung" ItemsSource="{Binding ElementName=me, Path=DataContext.ListTitel}" />
                </StackPanel>
                <telerik:DataFormCheckBoxField Grid.Row="0" Grid.Column="2" Label="Deaktiviert" DataMemberBinding="{Binding Deaktiviert, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" />
                <telerik:DataFormDataField Grid.Row="1" Grid.Column="0" Label="Nachname" DataMemberBinding="{Binding Nachname, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" />
                <telerik:DataFormDataField Grid.Row="1" Grid.Column="1" Label="Vorname" DataMemberBinding="{Binding Vorname, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" />
                <telerik:DataFormDataField Grid.Row="2" Grid.Column="0" Label="Durchwahl" DataMemberBinding="{Binding Durchwahl, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" />
                <telerik:DataFormDataField Grid.Row="2" Grid.Column="1" Label="Mobilnummer" DataMemberBinding="{Binding Mobilnummer, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True, ValidatesOnDataErrors=True}" />
            </Grid>
        </DataTemplate>
 
    </UserControl.Resources>
    <Grid>
        <telerik:RadDataForm CurrentItem="{Binding Employee}" Header="{Binding Employee.Nachname}" AutoEdit="True" CommandButtonsVisibility="None" EditTemplate="{StaticResource EmployeeTemplate}" AutoGenerateFields="False" />
    </Grid>
</UserControl>

namespace Entities
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
     
    public partial class Mitarbeiter
    {
        public Mitarbeiter()
        {
            this.Veranstaltungsanmeldung = new HashSet<Veranstaltungsanmeldung>();
            this.Zustaendigkeit = new HashSet<Zustaendigkeit>();
        }
     
        public int MitarbeiterId { get; set; }
        public int KundeId { get; set; }
        public int AnredeId { get; set; }
        public int TitelId { get; set; }
        public string Vorname { get; set; }
        public string Nachname { get; set; }
        public string Durchwahl { get; set; }
        public string Email { get; set; }
        [Required(AllowEmptyStrings = false, ErrorMessage = "Es muss eine Handynummer angegeben werden!")]
        [Display(Name = "Kunde")]
        [RegularExpression("^\\+(\\d+)\\s\\((\\d+)\\)\\s(\\d+)(\\s-\\s(\\d+))?", ErrorMessage = "Die Telefonnummer muss im Format +43 (XXX) XXXXX - XX sein")]
        public string Mobilnummer { get; set; }
        public bool Deaktiviert { get; set; }
        public string Bild { get; set; }
        public System.DateTime UpdateDatum { get; set; }
        public string UpdateBenutzer { get; set; }
     
        public virtual Anrede Anrede { get; set; }
        public virtual Kunde Kunde { get; set; }
        public virtual Titel Titel { get; set; }
        public virtual ICollection<Veranstaltungsanmeldung> Veranstaltungsanmeldung { get; set; }
        public virtual ICollection<Zustaendigkeit> Zustaendigkeit { get; set; }
    }
}

Mike
Top achievements
Rank 2
 answered on 05 Jul 2011
5 answers
165 views
Hi Guy,
How do I collapse / expande a GridViewComboBoxColumn.
Regards,

Freeky
Top achievements
Rank 1
 answered on 05 Jul 2011
5 answers
140 views
My project requires that the user should be able to create an appointment with a matching start and end time.  The scheduleview does not complain about doing this but it will not display.  Obviously because there is no time span to display.  However, I do need these to show up.  Outlook shows these 0 time appointments, so must I.  I've tried setting min height/widths on appointments but it seems to get ignored.  Any help?

Thanks,
Greg
Rosi
Telerik team
 answered on 05 Jul 2011
3 answers
148 views
Hi.

I need to use variable label (categorical) spacing in one of my charts. Ex; Space between LabelA and LabelB should be 1 unit, LabelB and LabelC has 1.5 units between them. How can I achieve this?

Thanks.
Evgenia
Telerik team
 answered on 05 Jul 2011
0 answers
237 views

Hi Support

We implement
IDataErrorInfo for our Data, when we enter invalid data in edit mode it shows red box but when we update it to old data it doesn't change and still shows invalid data and error message and let us pass the cell.

We don't use cell validation and we use MVVM pattern.

thanks in advance,
Mehri
 
 

 

public partial class DataDictionary : IDataErrorInfo 

{

#region IDataErrorInfo Members
public string Error  

get  

{

return null;  

}

}

public string this[string columnName]  

{

get

if (columnName == "Name")  

{

if (Name == null || Name == string.Empty) 

return "Name cannot be null or empty";  

else if (columnName == "Code"

{

if (Code == 0)

return "Code Cannot be zero";

}

return "";

}

}

#endregion

}
//****************

<telerik:RadGridView ItemsSource="{Binding AllDataDictionary}"

                    SelectedItem="{Binding SelectedDataDictionary}"

                    HorizontalAlignment="Left" Margin="3,28,0,47" 

                    Name="radGrid" ShowGroupPanel="False" Width="Auto" 
                    AutoGenerateColumns="False" 
                    ShowInsertRow="True" CanUserDeleteRows="False"

                    IsSynchronizedWithCurrentItem="True"

                    RowHeight="25" Height="405" >

<telerik:RadGridView.Columns>

            <telerik:GridViewDataColumn Header="Code" Width="70" DataMemberBinding="{Binding Code}"
                                        ValidatesOnDataErrors="Default" />

            <telerik:GridViewDataColumn Header="Name" Width="*" DataMemberBinding="{Binding Name}"
                                        ValidatesOnDataErrors="Default" />
</telerik:RadGridView.Columns>

</telerik:RadGridView>  

Mehri
Top achievements
Rank 1
 asked on 05 Jul 2011
6 answers
1.4K+ views
I have two updowns and a label.  The label is updated with the sum of the values entered into the two updowns.  I wired up the ValueChanged event to both updowns to call a method that does the calculation and then put the sum into the label.

It works, but it appears to behave like a text input in IE such that it only fires when the control loses focus.  The client needs to be able to see the values calculate as they type.

I tried using KeyDown, but it doesn't work because the UpDown still has focus and the value isn't evulated as changed until the control loses focus.

Is there a way to work around this?
Sébastien
Top achievements
Rank 1
 answered on 04 Jul 2011
0 answers
87 views
Hello.
How I can hide the Header in "RadClock" control? 
Like in "RadCalendar" control is a property "HeaderVisibility".
Thank you!
Lubch
Top achievements
Rank 1
 asked on 04 Jul 2011
11 answers
259 views
Hi,
I have followed the Open Access dsw tutorial (http://www.telerik.com/help/openaccess-orm/getting-started-root-quickstart-wpf-overview.html) so that I have generated only a single .generated.cs from one view on my SQL server.

How do I link this to the RadGridView? I have tried following your tutorials, however, a severe lack of skills on my part, has proven this to be a difficult task to carry out. If would also be great if I could display the filters for each heading as well.

Cheers. Any help is appreciated.

Regards, Al.
PetarP
Telerik team
 answered on 04 Jul 2011
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?