Telerik Forums
UI for WPF Forum
3 answers
1.1K+ views
Is it possible to initialize NumericUpDown with null, so that the NullValue is shown when the NumericUpDown is shown first time?
NullValue is shown correctly when a user deletes the content of the NumericUpDown, but when I initialize the view model's property with null NumericUpDown shows 1 (my minimal value).

My XAML code is the following:
<t:RadNumericUpDown ValueFormat="Numeric" Minimum="1" Maximum="6"
NumberDecimalDigits="0" IsInteger="True" IsEditable="True"
Value="{Binding Priority, UpdateSourceTrigger=PropertyChanged}" Margin="4"
NullValue="None"></t:RadNumericUpDown>
Vladi
Telerik team
 answered on 22 Apr 2013
0 answers
43 views
Filter Dialog Presentationproblem in Windows 7 with "Filter" and "Clear Filter" - Buttons.

Please look the attached file.
Peter
Top achievements
Rank 1
 asked on 22 Apr 2013
11 answers
348 views
Hello Forum

I have a RadGridView with two columns. One ComboboxColumn, and one other column. Lets say i have two rows in that grid as well. Whenever i change a value in the Grid, a Calculation is triggered. This calculation can change all the values in my two rows and columns.

Notice: Changing the value in the ComboboxColumn in Row1 can / does effect the value in the ComboboxColumn in Row2.

This works fine for all the column types i have tried, except the combobox column. The Combobox will not get updated until i edit a value in the same row, which is too late.

My ComboboxColumn definition looks like that:

<telerik:GridViewComboBoxColumn Header="Antriebsart"
     ItemsSourceBinding="{Binding Field[ANTRIEB].ProposedValues}"
     DataMemberBinding="{Binding Field[ANTRIEB].Value}" />

By searching the documentation and the forums for a solution i have found that there seems to be a difference between ItemsSourceBinding and ItemsSource. Without understanding the difference i have tried using ItemsSource as well, but this did not show any of my "ProposedValues" in the Combobox. Could this be because of the Indexer "Field[ANTRIEB].ProposedValues?

Additional Info: The Cells not being updated are readonly, i have not tested with "not readonly" cells. But they get updated when i edit another cell in the same row and with other columns, the readonly does not affect (avoid) the update.

Thanks in advance
Michael
Michael
Top achievements
Rank 1
 answered on 22 Apr 2013
7 answers
266 views
Hello,

   I'm binding a gridview to a DataTable whith 3 columns A,B,Total, where total is A+B.

   When Cell A or B is changed I update the DataTable using a class that Notifies the propertychanged.

   If I use the default DataGrid from WPF the column Total, is updated accordingly, but when I use the RagGridView, it's not updated. In order to have it updated I have to create a button and call the rebind method. (If I call the rebind whithin the CellEditEnded handler I get into an infitinte recursive loop; if I add a boolean to avoid this, I get exceptions...)

   How would be the way to get this working ? Which means how to update Sum column if A or B has been modified, acknowledging the business logic is managed within the class generating/updating the DataTable.

Thanks for your answer.

          private void gridView_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
       {
           if (!e.OldData.Equals(e.NewData))
           {
               this.DataProvider.Refresh();
           }
       }
       private void Button_Click(object sender, RoutedEventArgs e)
       {
           this.gridView.Rebind();
       }



  
Rossen Hristov
Telerik team
 answered on 22 Apr 2013
2 answers
149 views
I seems experience very bad performance degrade when I use drag and drop RadListbox.  The version I use is RadControls for WPF Q1 2012 SP1.  Here is my xaml code for the lisbox:

<telerik:RadListBox ItemsSource="{Binding Offices}" DisplayMemberPath="Name" Height="Auto" Margin="10,0,0,10" Grid.Row="2" Grid.Column="1" Width="120">
    <telerik:RadListBox.DragVisualProvider>
        <teleric:ScreenshotDragVisualProvider />
    </telerik:RadListBox.DragVisualProvider>
    <telerik:RadListBox.DragDropBehavior>
        <teleric:ListBoxDragDropBehavior />
    </telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>

The Offices binding to ItemsSource above has about total 500 records and type is List<string>.  Any recommendations or solutions are welcome.
Thanks,
Kangming
Top achievements
Rank 1
 answered on 22 Apr 2013
5 answers
235 views
I have dynamically created and added series on my chart. Each of these series has its own vertical axis which is created in the following way:

LinearAxis linearAxis = new LinearAxis { Title = "Violet Bar Axis", Maximum = maxValue + 1 };
barSeries.VerticalAxis = linearAxis;

I have vertical and horizontal zooming setup for my chart in my xaml:

<Controls:RadCartesianChart.Behaviors>
                <ChartView:ChartPanAndZoomBehavior ZoomMode="Both" PanMode="Both" />
                <ChartView:ChartTrackBallBehavior ShowIntersectionPoints="True" ShowTrackInfo="True" TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated"/>
</Controls:RadCartesianChart.Behaviors>

Why do I not see zooming on my vertical axes?

Is there something else I can setup when I dynamically create the axis?
Missing User
 answered on 22 Apr 2013
3 answers
270 views
I'm working on a project using RadPDFViewer. We've implemented multiple Windows 8 style themes with the following code snippet:

Windows8Palette.Palette.MainColor = ((SolidColorBrush)dictionary["BasicControlBackground"]).Color;
Windows8Palette.Palette.AccentColor = ((SolidColorBrush)dictionary["BasicDarkAccentColor"]).Color;
Windows8Palette.Palette.BasicColor = ((SolidColorBrush)dictionary["BasicHighlightColor"]).Color;
Windows8Palette.Palette.StrongColor = ((SolidColorBrush)dictionary["BasicControlForegroundColor"]).Color;
Windows8Palette.Palette.MarkerColor = ((SolidColorBrush)dictionary["BasicDarkAccentColor"]).Color;
 
StyleManager.ApplicationTheme = new Windows8Theme();

...in which the color brushes above are swapped out at runtime inside merged resource dictionaries.This gives us the ability to create a Light/Dark theme controlled by a dropdown.

However, we're finding that the colors used in some of the controls aren't acting the way we want (focus color in one control seems be be used for content elswhere), so we're customizing the templates. We've had good success with this approach so far, but the PDFViewer is being difficult.

Specifically, we want to force the page of the pdf (ie: just the area under the pdf itself, not the border around the page) to be white regardless of what background color we're using in other controls.

There seem to be a few possibilities for achieving this:
- Using a different theme (Office Dark, Vista etc...) for the PDFViewer and applying it explicitly. The downside is that we will no longer be able to apply an application wide theme and will have to specify the Windows 8 theme on all other controls.
- Figuring out how to override the template of the PDFViewer in a way that provides access to the page background. I haven't been able to figure this out.
- Applying different values for the Windows 8 palette for just the PDFViewer. As near as I can tell, the palette is global so no way to do it.

Is there a smarter way to go about this?
Todor
Telerik team
 answered on 22 Apr 2013
3 answers
85 views
if pdf file come from Pdfsharp
   if fontName.words.count>1
      telerik.pdfviewer cant display
      adobe reader can display
      c1.pdfviewer can display

Example: "Arial" works. "Arial Black"  and "Times New Roman"  not works.

PS: Pdfsharp => http://www.pdfsharp.net

Kammen
Telerik team
 answered on 22 Apr 2013
1 answer
339 views
I have a project that is currently using the WPF control suite. What I would like to do is import data from an xlsx spreadsheet into a DataSet.

There's really two aspects to the solution. First is a discovery-type service where I can get worksheet names, row by column counts, and then column data types. Secondly, I would like to import the data from a worksheet into a DataSet. Ideally without displaying a spreadsheet control as the process would be automated.

Of secondary importance is the reverse. E.g., open/create a workbook, create a new or clear an existing worksheet, and (append) data to a given worksheet.

Rather than include another vendor's library, I would like to do this with the currently used Telerik suite. I don't see any significant discussion in the product descriptions or forums so I am raising the question here.
Andrew
Telerik team
 answered on 22 Apr 2013
22 answers
762 views
Hi, I have a problem while using RadWindow as the picture showing.
The two windows showed error!
The first window with a gray WinForm DataGridView in a WindowsFormsHost,
and the second window whit a red one.
AS the picture showing, the red window cannot display normally.
Is there any way to solve this problem?

Wish your help.
Thank you !

My xaml code:
<Page x:Class="WpfBrowserApplication9.Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Page1" xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
          xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" 
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms">  
    <Grid> 
        <my:RadWindow Name="radWindow1" VerticalAlignment="Top" > 
            <wfi:WindowsFormsHost Height="200" Width="300">  
                <wf:DataGridView x:Name="xy"></wf:DataGridView> 
            </wfi:WindowsFormsHost> 
        </my:RadWindow> 
        <my:RadWindow Name="radWindow2">  
            <wfi:WindowsFormsHost Height="200" Width="300">  
                <wf:DataGridView x:Name="xzy" BackgroundColor="Red"></wf:DataGridView> 
            </wfi:WindowsFormsHost> 
        </my:RadWindow> 
        <telerik:RadButton Height="23" HorizontalAlignment="Right" Margin="0,0,48,2" Name="radButton1" VerticalAlignment="Bottom" Width="75" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Click="radButton1_Click">Button</telerik:RadButton> 
    </Grid> 
</Page> 
and code behind:
using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Windows;  
using System.Windows.Controls;  
using System.Windows.Data;  
using System.Windows.Documents;  
using System.Windows.Input;  
using System.Windows.Media;  
using System.Windows.Media.Imaging;  
using System.Windows.Navigation;  
using System.Windows.Shapes;  
 
namespace WpfBrowserApplication9  
{  
    /// <summary>  
    /// Page1.xaml  
    /// </summary>  
    public partial class Page1 : Page  
    {  
        public Page1()  
        {  
            InitializeComponent();  
            radWindow1.Show();  
        }  
 
        private void radButton1_Click(object sender, RoutedEventArgs e)  
        {  
            radWindow2.Show();  
        }  
 
    }  

LittleDragon
Top achievements
Rank 1
 answered on 22 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?