Telerik Forums
UI for WPF Forum
1 answer
98 views
How do I raise a RowDeleting event manually in code behind?

The RadGridView has the "Deleting" event for which you can specify an event handler in XAML. So when the user presses the Del-Key, this event handler will be called. I'd like to do the same programatically from C# code.
Dimitrina
Telerik team
 answered on 20 Dec 2013
3 answers
463 views

Hi, 
  
   I have been using the RadMaskedTextBox with MaskType "Numeric" and am getting an issue "Input string not in correct format" when following the below steps:

1) Enter a number
2) Modify the number to a negative value (-)
3) Delete the number using BackSpace
 
  i.e., Exception thrown with negative symbols.

As a workaround to this issue , telerik forums suggested to use RadMaskedNumericInput instead. But there comes another issue that I have to give fixed number of digits only in the Mask.

My concerns are :-

1) How to give the mask if the maximum number of numeric places is 18 and decimal digits as 2 ( say for eg., 123456789122345567.55)? 
2) Is there any alternative other than giving mask?
3) Can I give negative symbols as well ? If so, will it figure out the exception thrown with negative symbols.

Please help to figure out this issue..

Thanks
Petar Mladenov
Telerik team
 answered on 20 Dec 2013
5 answers
504 views
I have the following style defined in my WPF;

<Style TargetType="{x:Type telerik:GridViewRow}">
    <Style.Triggers>
        <MultiDataTrigger>
            <MultiDataTrigger.Conditions>
                <Condition Binding="{Binding Path=IsActive}" Value="False" />
                <Condition Binding="{Binding Path=InPlan}" Value="True" />
            </MultiDataTrigger.Conditions>
 
            <Setter Property="Background" Value="AntiqueWhite" />
            <Setter Property="Foreground" Value="Red" />
        </MultiDataTrigger>
    </Style.Triggers>
</Style>

My problem is that this style is only applicable to one grid on the form, consequently I am getting binding errors on each of the other grids when the form loads.  How do I apply this style to the appropriate grid?

Thanks in advance.
Raymond
Top achievements
Rank 1
 answered on 19 Dec 2013
2 answers
123 views
I'm using the Telerik themes provided in the 'Binaries.NoXaml' folder of the RadControls installation folder and setting and switching the themes at runtime using the tutorial provided here: http://www.telerik.com/help/wpf/styling-apperance-themes-runtime.html

When I switch themes all RadControls update to the new theme except the RadMap control. I can see in the WPF demos that the RadMap control has many different themes (i.e. Windows7, Windows8, Windows8Touch, OfficeBlack, etc...) but it doesn't seem to use them. Any advice?
Mel
Top achievements
Rank 1
 answered on 19 Dec 2013
7 answers
150 views
when the outlook bar's splitter is dragged to resize, it occupies the entire area of the main region. Here is a simplified layout within the Shell.
In Outlook, the main region would have a minimum width set. Even if i set the min width to the border or within the content control inside it is not working as expected
<DockPanel x:Name="LayoutRoot">
 
        <ContentControl x:Name="RibbonPanel" />
        <ContentControl x:Name="StatusBarPanel" />
        <ContentControl x:Name="ControlPanelRegion"  />
        <ContentControl x:Name="OutlookBarPanel"  />
        <Border  BorderThickness="2" Padding="0" >           
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <ContentControl x:Name="MainRegion" />
                <ContentControl x:Name="AnotherRegion"  />
            </Grid>
        </Border>
</DockPanel>
Tina Stancheva
Telerik team
 answered on 19 Dec 2013
0 answers
90 views
Hello,

I'm using the Gridview version 2013.3.1016.40.

I can't seem to find a way to use an itemspaneltemplate for each GridViewRow.

What I'm actually trying to do is add a behavior on a row.

Is it possible to do this without replacing the Template as a whole?

Best regards,

Stefaan.
Stefaan
Top achievements
Rank 1
 asked on 19 Dec 2013
2 answers
218 views
Is there an MVVM way of using the RadPdfViewer to silently print a document? We currently are using the following line in the DocumentChanged event handler to do the silent printing.

((RadPdfViewer)sender).Print(new PrintSettings("Document 1", true));


Thank you,
Mark
Mark
Top achievements
Rank 1
 answered on 19 Dec 2013
9 answers
204 views
hello, how i can change style of navigation view button after adding 
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
                <telerik:MonthViewDefinition />   ?
Kalin
Telerik team
 answered on 19 Dec 2013
1 answer
144 views
I am programmatically filtering my gridview.  The gridview has about 2000 rows, with a column called "Tag" of type uint that has a unique value for each row.  In another control, my application user can select or unselect the Tags he wants to see in the gridview.

I'm using DistinctFilter as shown below.  I'm seeing very poor performance and even a stackoverflow apparently coming from ResumeNotifications (no stack trace is available for that).
When the user wants to show all 2000 rows, no filtering is needed so that works fine.  But when a single row is to be filtered out, I would AddDistinctValue 1999 times.
Is there some better way I should be doing this?   

GridViewColumn tagColumn = this.gridView.Columns["Tag"];
IColumnFilterDescriptor tagFilter = tagColumn.ColumnFilterDescriptor;
 
// Suspend the notifications to avoid multiple data engine updates
tagFilter.SuspendNotifications();
                 
tagFilter.DistinctFilter.Clear();
 
foreach (var pair in myDictionary)
{
    if (pair.Value.IsShown)
    {
        tagFilter.DistinctFilter.AddDistinctValue(pair.Key);
    }
}
 
// Resume the notifications to force the data engine to update the filter.
tagFilter.ResumeNotifications();
Dimitrina
Telerik team
 answered on 19 Dec 2013
1 answer
852 views
Hi!

When I use this code, to create an empty PDF file (2013Q3SP1):

var filename = "C:\\temp\\test.pdf";
var doc = new Telerik.Windows.Documents.Model.RadDocument();
var stream = new FileStream(filename, FileMode.Create);
var pdfExp = new Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider();
 
pdfExp.Export(doc, stream);
stream.Close();

and look at test.pdf I get

/MediaBox [0 0 612 792]

This is OK for letter format, which is the default.

But when I set the size to A4:

doc.SectionDefaultPageSize = Telerik.Windows.Documents.Model.PaperTypeConverter.ToSize(Telerik.Windows.Documents.Model.PaperTypes.A4);
pdfExp.Export(doc, stream);
stream.Close();

the Mediabox looks like this

/MediaBox [0 0 594.75 842.25]

I cannot find an official reference which is the correct size, but when I do a google search with https://www.google.de/search?q="%2FMediaBox+%5B0+0+594.75+842.25%5D" I just get one page of results.But if I use https://www.google.de/search?q=%2FMediaBox+%5B0+0+595+842%5D to search, I get hundreds of pages with this result.

Could you check, which is the correct value and If /MediaBox [0 0 595 842] is the correct one, how to fix it?

Thanks 

Mike



Alexander
Telerik team
 answered on 18 Dec 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?