Telerik Forums
UI for WPF Forum
1 answer
202 views
HI, I have a problem to export my document to PDF file radrichtexbox to the error shown is: "Operation is not valid due to the current state of the object".

This happens sometimes, it seems the problem is in the format that takes the document to put bullets.
My process for creating the PDF document is:

Try
ProviderPdf Dim As New PdfFormatProvider PdfFormatProvider = ()
Using output As Stream = File.Open (AppDomain.CurrentDomain.BaseDirectory & "\ temp \" & Label1.Content &. "Pdf", FileMode.Create)
providerPdf.Export (RadRichTextBox1.Document, output)
End Using
Catch ex As Exception
MsgBox (ex.ToString)
End Try

The stack trace is:
   
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfFontPool.get_Item (Span span) in 54
   
in writer, Paragraph Paragraph, RectangleF rect) in 64
   
in writer, Paragraph paragraph) in 84
   
in sectionBox, PdfContentsWriter writer) in 283
   
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.ExportPage (SectionLayoutBox sectionBox, PdfContentsWriter writer) in 343
   
in contentsWriter) in 375
   
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfContents.WriteContents (pdfwrite writer) in 22
   
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfStream.WriteToCore (pdfwrite writer) in 57
   
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfObject.WriteTo (pdfwrite writer) in 42
   
in Telerik.Windows.Documents.FormatProviders.Pdf.RadPdf.PdfWriter.WritePdfObject (PdfObject obj) in 56
   
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfDocumentExporter.Export () in 386
   
in Telerik.Windows.Documents.FormatProviders.Pdf.PdfFormatProvider.Export (RadDocument document, Stream output) at 56
   
in WPF_Dictado.Window1.parametrospdf () in C: \ Documents and Settings \ Administrator \ Desktop \ WPD_Dictado RIS \ WPF Dictation \ Window1.xaml.vb: line 1066

I would greatly appreciate the help I can provide. 
Martin Ivanov
Telerik team
 answered on 30 Dec 2011
1 answer
148 views
I haved created one rad document in which I want functionality of print preview using radRichTextBox

I have implemented the following
Dispatcher.BeginInvoke((Action)(() =>
 {
                        RadRichTextBox1.Document = document;
                    }));
 
                    t1.Dispose();
                    RadRichTextBox1.PrintPreview();

But its not working
So can you please guide me how it is possible for me to implement.

I really appreciate your any help. :):):)

Thanks
Boby
Telerik team
 answered on 30 Dec 2011
2 answers
94 views
I have a main window that contains a RadMenu and a RadDocking.

When I select a menu item, I add a new RadPane to the RadDocking's RadPaneGroup. If I select the menu item multiple times, I get multiple RadPane's added, which is what I want.

The odd thing is that if I close one of the RadPanes, by clicking on its corner 'x' icon, the menu item disables itself.  So once I close a pane, I can no longer open any more.

I can envision of no mechanism by which this could be happening, but happening it is.

I've created a stripped-down solution that demonstrates the problem.  It works out to a 8.7MB zip file.  I can't attach it here, should I email it to someone?
Jeff
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
292 views
I am using a ComboBox with the following settings:
<Setter Property="TextSearchMode" Value="StartsWith" />
<Setter Property="IsEditable" Value="True" />
<Setter Property="IsReadOnly" Value="True" />

Is there a codeless (MVVM) way to force a valid value to be chosen?  As it stands, the user can click into the "TextBox" part of the RadComboBox, hit the backspace key repeatedly to clear out the text, and effectively set the value to null.  This is even though the ComboBox does not have a null / blank value available for selection via the mouse / arrow keys.

The ideal situation would be to return the ComboBox to its original value if the user does not select a valid value.

I'm sure there is a method of doing this via code behind, but this seems like something that could already be built into the control.

Thank you,
Kevin
Yana
Telerik team
 answered on 30 Dec 2011
5 answers
546 views
I've got a RadGridView on a WPF form.  The control is in a cell of a Grid control.  The cell isn't tall enough to show a full number of rows all of the same height.  That is, the last row at the bottom is displaying as a partial row.

When I scroll all the way down to the bottom, the last row is not displaying fully.  Even though the scroll bar is all the way down, it doesn't scroll the whole last row into view.

How do I fix this so the last row will display in full?

Tony

Edit:  Here is the XAML for the RadGridView control:

<my:RadGridView AlternationCount="1" 
           AutoExpandGroups="True" 
           AutoGenerateColumns="False" 
           CanUserDeleteRows="False" 
           CanUserFreezeColumns="False" 
           CanUserInsertRows="False" 
           CanUserResizeColumns="True"
           CanUserSortColumns="True" 
           DataLoadMode="Asynchronous" 
           EnableColumnVirtualization="True" 
           EnableRowVirtualization="True" 
           FontSize="18" 
           FontWeight="Bold" 
           Grid.Column="1" 
           Grid.Row="1" 
           IsReadOnly="True" 
           Margin="5" 
           Name="HotListResults" 
           SelectionChanged="HotListResults_SelectionChanged"
           SelectionUnit="FullRow" 
           ScrollViewer.CanContentScroll="True" 
           ScrollViewer.HorizontalScrollBarVisibility="Auto" 
           ScrollViewer.VerticalScrollBarVisibility="Auto" 
           ShowGroupFooters="True"
           ToolTip="Matching Hot List Entries">
    <my:RadGridView.Columns>
        <my:GridViewDataColumn DataMemberBinding="{Binding ListName,   Mode=OneWay}" Header="Hot List"    Width="150" />
        <my:GridViewDataColumn DataMemberBinding="{Binding AlarmClass, Mode=OneWay}" Header="Alarm Class" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding CountryId,  Mode=OneWay}" Header="Country"     Width="100" />
        <my:GridViewDataColumn DataMemberBinding="{Binding LocaleCode, Mode=OneWay}" Header="State"       Width="75" />
        <my:GridViewDataColumn DataMemberBinding="{Binding Plate,      Mode=OneWay}" Header="Plate"       Width="150" />
        <my:GridViewDataColumn DataMemberBinding="{Binding BeginDate,  Mode=OneWay, Converter={StaticResource DateConverter}}" Header="Begin Date" Width="200" />
        <my:GridViewDataColumn DataMemberBinding="{Binding EndDate,    Mode=OneWay, Converter={StaticResource DateConverter}}" Header="End Date"   Width="200" />
    </my:RadGridView.Columns>
</my:RadGridView>
Vanya Pavlova
Telerik team
 answered on 30 Dec 2011
5 answers
179 views
Hi,

is it possible to create chart using the new ChartView like the meteo chart in the original RadChart?
I need to show image and value on y axis, and date on x axis. 
Charly
Top achievements
Rank 1
 answered on 30 Dec 2011
2 answers
259 views
.xaml:
            <ListBox Name="itemsControl" ItemsSource="{Binding PagedSource, ElementName=radDataPager}"/>
            <telerik:RadDataPager Name="radDataPager" Height="30" VerticalAlignment="Bottom"
               Source="{Binding myItemsSource}"
               PageSize="10"
               DisplayMode="All"/>
.cs:
            List<string> list = new List<string>();
              
            for (int i = 0; i < 36; i++)
            {
                list.Add(i.ToString());
            }
              
            this.radDataPager.Source = list;

Hi,
Now I got a problem that using ListBox with RadDataPager,When turn the lastpage to previouspage(for example,the last page only have 1 item),the previouspage's itemcount turn to 1,how could I fix that?Here is a demo code above,with telerik 2010 Q2,Thanks.

 

Best Wishes,

Sky

Yu
Top achievements
Rank 1
 answered on 30 Dec 2011
1 answer
82 views
Hello,

I am trying to create a row template which is only applied to certain items. It is not clear which template governs the row in a treelistview (is it a GridViewGroupRow or a GridViewRow). Additionally, I appear to be unable to modify a copy of either the RowStyle or the GroupRowStyle in Expression Blend. Are the XAML representations of the default styles listed somewhere?

Cheers,

Mike
Mike
Top achievements
Rank 1
 answered on 29 Dec 2011
3 answers
198 views
I have a RadGridView control on a screen in my WPF application.  It holds the results of a search the user can perform.  There are two different types of objects that can be in this control; they both implement an interface that the window that holds the RadGridView is aware of.

One of these two types contains an array of a third type of object that I want to display in a Row Details data template, but only if the array isn't empty.  The other type does not have any information in it that I want to display in any row details area.

So I need a way to set the Row Details Visibility property for each row in the RadGridView based on its underlying type.  I've already added a boolean property called CanDisplayDetails.  For the type that  I don't want to display any details for, this always returns false.  Of the other type, this returns true if the number of rows in an array property is greater than zero. 

How do I hook this property up to each row's DisplayRowDetails property?

Tony
Tony
Top achievements
Rank 1
 answered on 29 Dec 2011
1 answer
127 views
Hello
 How can we bind parent-child relationship in Treeview recursively remember this could be for n-tier for e.g

Company
Division-1
           Sub-Division-11
           Sub-Division-12
           Sub-Division-13
Division-2
           Sub-Division-21 
           Sub-Division-22
           Sub-Division-23  

In my database i have Node ID and Parent Node ID also i want to do drag and drop inside this tree.


  
Zarko
Telerik team
 answered on 29 Dec 2011
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?