Telerik Forums
UI for WPF Forum
6 answers
138 views
I have a scatter series where all the values are aligned at Y == 1.0. The RadChart is inside a grid with a gridsplitter controlling the space available for the RadChart. Now, if I scale the view vertically, sometimes values are displayed incorrectly (see red triangles in the example screenshots below). This issue doesn't appear always, but often enough to be a serious problem for us. If the problem occurs, the only way to fix it is to resize the RadChart again, horizontally (always fixes the problem) or vertically (usually fixes the problem, sometimes the problem reappears).

We are not changing the data bindings or anything like that, we are simply rescaling the grid view with the gridsplitter. With the data in the screenshots it is very easy to see that triangles were rendered at incorrect Y-values. But we have other visualizations where the scatter data is not aligned to a single Y axis value and we can't afford the items to be displayed at incorrect values!

I'm limited to version Q2 2011, what can we do to fix this?

   - Jussi

View opens:


After scaling vertically:


And after additional scaling:


Here's an example of the blue and red scatter series, both using exactly the same data binding:


Obviously, this is not acceptable.
Ves
Telerik team
 answered on 09 Oct 2012
3 answers
178 views
We are currently using the RadPropertyGrid control to display information for different types of Business Objects. We're also using the Command pattern to support undo / redo functionality for certain actions (adding a new Business Object, removing a Business Object, etc.).

What we would like to be able to do is somehow hook our RadPropertyGrid into our Undo/Redo Service. We have considered listening to the PropertyChanged event of the object that is currently being display through the RadPropertyGrid, but wanted to see if anyone else had tackled this problem before, or could point us in the correct direction.

Any help would be greatly appreciated.

Thanks,
Derrick
Vlad
Telerik team
 answered on 09 Oct 2012
2 answers
515 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
771 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
146 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
199 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
94 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
100 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
159 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
533 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?