Telerik Forums
UI for WPF Forum
1 answer
563 views
Is there a way to use the masked input to force proper email address formatting?
something along the lines of Mask="a25\@a25.LLL" or even better Mask="A3a25\@A3a25.L3"
I'd like it so that when the user types an '@' it skips the rest of the email prefix characters.
Same thing when they type the '.'
Can anyone think of a simple way to do this where I don't have to check the characters pressed in the code behind. That just seems like it wouldn't be a very cost efficient trasaction.

Eric
Alex Fidanov
Telerik team
 answered on 19 May 2011
1 answer
100 views
Is there a way to define the field layout (Grid.Row, Grid.Column) when handling the AutoGeneratingField  Event in C# ?

When Auto Generating the DataForm fields, it seems as though one cannot define the field sequence or position (only one column of fields is generated).

Pavel Pavlov
Telerik team
 answered on 19 May 2011
1 answer
105 views
I have created a custom control by deriving a class from the RadMaskedNumericInput control. It works fine until I create a resource style for it. Once the style exists, the control is no longer visible when running the app. When I tab, I can still give it focus, but it is not visible. It is visible when on a page in Visual Studio designer. I am working in WPF. The problem does not occur when wrapping the RadDatePicker.

Here is the derived class:

public class ccNumericTextBox : RadMaskedNumericInput

 

{

 

 

 

 

  public ccNumericTextBox()

 

  {

  }

 

 

 

 

 

 

 

  public override void EndInit()

  {

 

    base.EndInit();

 

  }

 

 

  protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)

  {

    this.SelectAll();

 

    base.OnGotKeyboardFocus(e);

 

  }

 

}

Here is the XAML:

<cc:ccNumericTextBox x:Name="txtDuration" Padding="2" Mask="#3.1" Height="22" Value="{Binding Path=Hours, Mode=TwoWay}"/>

 

 

 

Here is the Style:
<Style TargetType="{x:Type cc:ccNumericTextBox}">

   <Setter Property="Margin" Value="3,3,3,3"/>

 

</Style>

 

Alex Fidanov
Telerik team
 answered on 19 May 2011
3 answers
199 views
Hi,
I was stuck at a point where I need to assign a shortcut key which is stored in the database respective to a menu.
When I fetch the data the for the menu, I fetch all the details related to it, in a hierarchical manner and bind it to RadMenu DataSource.
Now my requirement is to assign the shortcut key to each RadMenuItem in the RadMenu, for this I thought of creating a CustomCommand using RoutedCommand, CommandBinding and KeyGesture. With this will create a MenuRoutedCommand and thus create a Command that will be assigned to each RadMenuItems command property.

But when i found the RadMenu items in loaded event, those items are not the RadMenuItem but the collection of Hierarchical object used to create the item. So, not able to assign Command as I was unable to get the RadMenuItem.

Please let me know how to assign Command in HierarchicalData source.

Or If there is anyother approach to assign shortcut keys dynamically to the RadMenuItem.

Please reply to it as soon as possible.

Thanks.
 
Hristo
Telerik team
 answered on 19 May 2011
1 answer
52 views
I am getting the following sorting error in several grids with different bindings when trying to sort. The data shows up correctly but I get an error when I try to sort:
'SystemFindingSystemModifierTypeEntityCollection' type does not have property named 'SystemModifierType_.Name', so cannot sort data collection.

I am using LLBLGen as my ORM and here is an example of a GridViewDataColumn I am using:

<

 

 

telerik:GridViewDataColumn Header="Modifier Type" DataType="{x:Type System:String}" Width="*" DataMemberBinding="{Binding SystemModifierType_.Name}" />

 

Vlad
Telerik team
 answered on 19 May 2011
1 answer
86 views
Can someone provide any example to use ExpressionColumn with MVVM?

I have a GridView Itemsource binded to a collection of clients. Only on the grid i need to show a column to calculate 2 values, but i only find examples puting business logic on view, nothing using mvvm.
Vlad
Telerik team
 answered on 19 May 2011
4 answers
114 views

Hello Telerik,

We use a ResourceFIle for all displayed text in our application in order to support Globalization.  This works great for the GridViewDataColumn.Header unless it is in a child GridView. 

In the example below, we were forced to use a custom header in in the RowDetailsTemplate in order for the Header to Display correctly.  If we set the Header property in _gridDetails like in _gridPing it does not work. There were no binding errors, but the Header text was the displaying the binding property name, not the ResourceFile property value.

Is this a known issue?  I would like to use the simpler syntax if possible.


Thank you,
-Mark

<datagrid:NstrumentDataGrid x:Name="_gridPing"  Grid.Row="1" ItemsSource="{Binding Responses}"  >
    <datagrid:NstrumentDataGrid.Columns>
        <telerik:GridViewToggleRowDetailsColumn />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Address}" Width="150" DataMemberBinding="{Binding Path=Address}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Bytes}" Width="75" DataMemberBinding="{Binding Path=BufferLength}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Sent}" Width="75" DataMemberBinding="{Binding Path=Sent}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Received}" Width="90" DataMemberBinding="{Binding Path=Received}"/>
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.PercentLost}" Width="75" DataMemberBinding="{Binding Path=PercentLost}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Min}" Width="75" DataMemberBinding="{Binding Path=Min}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Avg}" Width="75" DataMemberBinding="{Binding Path=Avg}" />
        <telerik:GridViewDataColumn Header="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Max}" Width="75" DataMemberBinding="{Binding Path=Max}" />
    </datagrid:NstrumentDataGrid.Columns>
    <datagrid:NstrumentDataGrid.RowDetailsTemplate>
        <DataTemplate >
            <datagrid:NstrumentDataGrid x:Name="_gridDetail" ItemsSource="{Binding Responses}" Margin="25,0,0,0" BorderThickness="0" >
                <datagrid:NstrumentDataGrid.Columns>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=Status}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.Status}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=RoundTripTime}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.RTT}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn Width="125" DataMemberBinding="{Binding Path=BufferLength}" >
                        <telerik:GridViewDataColumn.Header>
                            <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.Resources.Tools.BufferLength}"/>
                        </telerik:GridViewDataColumn.Header>
                    </telerik:GridViewDataColumn>
                </datagrid:NstrumentDataGrid.Columns>
            </datagrid:NstrumentDataGrid>
        </DataTemplate>
    </datagrid:NstrumentDataGrid.RowDetailsTemplate>
    <telerik:RadContextMenu.ContextMenu >
        <telerik:RadContextMenu x:Name="_contextMenu"  Opened="RadContextMenu_Opened"/>
    </telerik:RadContextMenu.ContextMenu>
</datagrid:NstrumentDataGrid>
mark
Top achievements
Rank 1
 answered on 18 May 2011
3 answers
145 views
Do the Telerik controls work with Visual State Manager?  I am using 2010.1.309.35 right now, and specifically I am working on the GridViewRow.  I notice that the template doesn't automatically show states in Blend, but didn't expect it to either.  But it appears that I cannot create these states either like I can on standard MS WPF 3.5 controls.  For example, I created a VisualStateGroup named CommonStates and added the states Normal and MouseOver.  I really prefer working with VSM as opposed to triggers and wondered if someone from Telerik could address VSM support in Telerik controls.

Thanks,
David
Kalin Milanov
Telerik team
 answered on 18 May 2011
5 answers
90 views
Hi,
I was wondering, is it possible to create your own chart type in RadChart?

Thanks,
Petr
Giuseppe
Telerik team
 answered on 18 May 2011
3 answers
347 views

Hi,

How would you handle the following issue?

Setup
I have a DocumentHost control which contains 2 RadPanes (RadPane1 and RadPane2). Each RadPane contains 2 textboxes (Textbox1 and Textbox2). I have subscribed to the GotFocus and LostFocus on each RadPane.

Steps
1. I float RadPane2 and subscribe to the GotFocus and LostFocus of the ToolWindow using the PaneStateChange event.
2. I leave RadPane1 in the DocumentHost.
3. I click on RadPane1 Textbox1 and the RadPane1 GotFocus is fired.
4. I click on RadPane2 Textbox1 and the RadPane2 and ToolWindow GotFocus is fired.
5. I click on RadPane1 Textbox1 and no GotFocus is fired for RadPane1.
6. I click on RadPane2 Textbox1 and no GotFocus is fired for RadPane2.
7. If I click on RadPane1 Textbox2 GotFocus is fired.

Observation
It seems as though I can have one RadPane in the DocumentHost and one floating ToolWindow which both think they have focus at the same time. Shouldn't I only be able to have one RadPane that has focus as any point in time?

Question

How can I work out which pane has focus regardless of where it is located? Unfortunately the RadDocking control does not have an event like this.

 

Yana
Telerik team
 answered on 18 May 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
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?