Telerik Forums
UI for WPF Forum
2 answers
541 views
Very simple question, but I'm not sure how to do it with the Telerik MaskedInput controls.  How do you clear the control?  For example, I'm using a RadMaskedTextInput to collect social security numbers.  The Mask property is set to "d3-d2-d4".  If I want to clear the control do I set the Value property to "000000000"?  Or do I set the Text property to "___-__-____"?  Or is there some other property that I should use instead?  I've tried looking for a Clear() method of the control, but there doesn't appear to be one, unless I've missed it.

I'm using VS 2010 Premium, .NET 4.0, and 2011 Q2 versions of the Telerik controls.
Rod
Top achievements
Rank 1
 answered on 08 Oct 2012
1 answer
826 views
What's going on with the RadPanes collection when clicking the Close (x) button from the pane header? RadPanes are being added through code. The RadPaneGroup.Items.Count property is incremented and decremented as panes are added and closed (x). However, the RadDocking.Panes.Count property only increments as new RadPanes are added programmatically and so I don't understand the relationship here. Shouldn't the RadDocking.Panes.Count property sum the total of all panes in the RadPaneGroups?

I've tried removing closed RadPanes in the RadDocking_Close event by clearing the RadDocking.ActivePane.Content, .Header, and .DataContext properties as previous forum posts suggest, but an "object not set to a reference" error is thrown when the RadDocking.ActivePane.RemoveFromParent method is called. Hence, I can't free up resources by clearing out closed panes when a pane is closed.

Further, the RadPaneGroup.Items.Count value is decremented by 1 for each RadPane that has its pinned stated changed to "unpinned," then incremented by 1 for each RadPane that becomes "pinned." This too is strange since the RadPane's are still in the group; just unpinned.
George
Telerik team
 answered on 08 Oct 2012
2 answers
159 views
I'm working with the Telerik 2011 Q2 WPF controls (the last version we got, although we will be renewing our license soon).  I'm trying to put a control on the form for gathering the client's social security number.  Initially I used the RadMaskedNumericInput, because that's what I thought I should for SSN.  I now realize that was a mistake.  Now I believe I have to use the RadMaskedTextInput control.  I've tried a Mask value of "###-##-####" and now I'm trying "d3-d2-d4", but I don't know that it makes much difference.

What does make a big difference is what comes from the database (SQL Server 2005) and what goes back to the database.  As it turns out, all of the SSN in the database have the "-" between the first 3 digits and the second 2 digits, and between the second 2 digits and the third 4 digits.  Thus, if the client had a SSN of 555-12-1212, that is exactly what's stored in the database.  That's what's got to be displayed, that's what's got to go back.  And of course its stored as a VARCHAR(11) in the database.  But when the data gets fetched from the database, what gets displayed in the RadMaskedTextInput control looks like this (using the same ficticious SSN): "555--1-2___"

That's not going to work at all.  What am I doing wrong and how do I fix it?  Here's the XAML:
<telerik:RadMaskedTextInput Name="radSocialSecurityNo" Mask="d3-d2-d4" VerticalAlignment="Center"
                                                             TabIndex="11" Value="{Binding Path=SocialSecurityNo}" SelectionOnFocus="SelectAll"
                                                             ValueChanged="radSocialSecurityNo_ValueChanged" LostFocus="radSocialSecurityNo_LostFocus"
                                                             TextMode="MaskedText"  InputBehavior="Replace" />

Rod
Top achievements
Rank 1
 answered on 08 Oct 2012
3 answers
230 views
I'm looking for a way to set the drop-down width for a ComboBoxCoumn to the same width of the column.
Yoan
Telerik team
 answered on 08 Oct 2012
1 answer
109 views
Hello
i need to read/capture a value belongs to the cell selected in gridview
in the second time i need to generate an event when i click on one cells,this event return a value that belongs to the cell selected
can you help me plz
Amine
Top achievements
Rank 1
 answered on 08 Oct 2012
1 answer
136 views
I'm trying to avoid a lot of custom work with themes because all I want to do is change the Header BorderBrush used on various controls.  I was hoping I could do this as in the following snippet from a RadCalendar Style in my ResourceDictionary...

<ControlTemplate TargetType="{x:Type telerik:RadCalendar}">
    <Grid>
        <!-- Standard RadCalendar Suff Omitted for brevity -->
    </Grid>
    <ControlTemplate.Triggers>
        <Trigger Property="telerik:StyleManager.Theme"
                 Value="telerik:Office_Black">
            <Setter TargetName="Navigation"
                    Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="#FF5B5B5B"
                                      Offset="1" />
                        <GradientStop Color="#FF868686" />
                        <GradientStop Color="#FF0E0E0E"
                                      Offset="0.449" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Trigger>
        <Trigger Property="telerik:StyleManager.Theme"
                 Value="telerik:Office_Blue">
            <Setter TargetName="Navigation"
                    Property="Background"
                    Value="Blue">
            </Setter>
        </Trigger>
    </ControlTemplate.Triggers>
</ControlTemplate>

And then in my xaml...

<telerik:RadDatePicker Width="300" telerik:StyleManager.Theme="{Binding TelerikTheme}" CalendarStyle="{StaticResource RadCalendarStyle1}"/>

However it doesn't work.  Is there anyway to implement something along these lines?

Thanks in advance,
Steve








Masha
Telerik team
 answered on 08 Oct 2012
2 answers
179 views
Hello
I would like to create custom context menu for raddatetimepicker, using rad contextmenu. Hover I cannot asign it. It always diplaying default textbox contextmenu.
Marcin
Top achievements
Rank 1
Veteran
 answered on 08 Oct 2012
4 answers
558 views
Hello Telerik,

My scenario is this:
I have a client-server application with a tree (RadTreeView), which is data bound with a DataTemplate for the nodes.
Nodes that are not yet expanded don't hold any data, but an invisible child node, so an expander will be displayed.
Expanding the node loads the next level from the server, then removes the child node from the ItemsSource and then adds the new nodes to the ItemsSource.
The WPF application is designed as MVVM.
Since the application has more windows besides the tree, and the response from the server might take a while, the application should not wait for the server. Thus we decided to use a BackgroundWorker in the view model.

private void LoadChildrenBackground()
{
 BackgroundWorker backgroundWorker = new BackgroundWorker();
 backgroundWorker.DoWork += (sender, args) => _node.Expand();
 backgroundWorker.RunWorkerCompleted += (sender, args) =>
  {
   Children.Clear(); //or Children.Remove(DummyChild); <- here is there problem!
   foreach (ITreeNode child in _node.Children)
   Children.Add(new TreeViewItemViewModel(child, this, true));
   };
   backgroundWorker.RunWorkerAsync();
}

Effect:
When I run the program, and expand a few nodes by clicking the expander, the tree runs into a NullReferenceException.
I get this call stack location:
c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TreeView\Virtualization\TreeViewPanel.cs'  Line 1452

This happens only when a level has more than 405 nodes, and when the background worker is used, and when I remove the dummy child. So I suspect it's a matter of the asynchronous behaviour when removing an Item from the ItemsSource.

I have tried removing the dummy child before and after inserting the new nodes, even after the background worker is finished, it all ends up in the exception.

I can provide a simple example in a Visual Studio solution which demonstrates the effect (17kB zip).
Maybe your developers are interested in the exception, or maybe you have a workaround(?)

I hope you can help me, because when I get the RadTreeView running with our MVVM pattern, my evaluation will be (positively!) complete. Seems like this is the last issue I have :)
Martin
Top achievements
Rank 1
 answered on 08 Oct 2012
2 answers
127 views
Hi 

I'm developing a Surface v2.0 application and I'm using book control to display images (converted from a pdf document). I'm containing the control in a ScatterViewItem to allow the book to be resizable and draggable. This is all working fine. 

My problem is when trying to turn the page, any drag motion moves the ScatterViewItem and doesn't turn the page. A Single/Double tap on the corner of the page does turn the page though but isn't intuitive enough to be useful.

Does anyone have experience in using the control in a Surface app and knows how to enable the page turn please (I know it's a bit of a long shot).

 I've included the Xaml I'm using below

<s:ScatterView AllowDrop="True" x:Name="myScatter" HorizontalAlignment="Stretch"
                                     VerticalAlignment="Stretch"
                                     Background="Transparent" >
         
       
            <s:ScatterViewItem Height="500" Width="600">
                <telerik:RadBook x:Name="RadBook1" RightPageIndex="1" FirstPagePosition="left" Margin="10">
                    <telerik:RadBookItem>
                        <Image Source="pr001.png"/>
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr002.png" />
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr003.png" />
                    </telerik:RadBookItem>
                    <telerik:RadBookItem>
                        <Image Source="pr004.png"/>
                    </telerik:RadBookItem>
                </telerik:RadBook>
            </s:ScatterViewItem>
            </s:ScatterView>

Iestyn
Top achievements
Rank 1
 answered on 08 Oct 2012
13 answers
201 views
Hi guys,
I need your professional support.

The current behaviour of autocomplete logic is to complete typed characters with appropriate string value. I would like to have another behaviour if it is possible: when you type the characters, combobox will show all possible items in dropdown menu of the combobox and user will be able to select the item from the filtered list.

Thanks in advance,
Julian




Ivo
Telerik team
 answered on 08 Oct 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?