Telerik Forums
UI for WinForms Forum
2 answers
413 views

Hi, I'm having the following problem. When calling

 

pdfProvider.Export(document, stream);

 

where pdfProvider is PdfFormatProvider and document is RadFlowDocument, I sometimes get an Illegal Path exception with this stack trace:

 

   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
   at System.IO.Path.GetExtension(String path)
   at Telerik.Windows.Documents.Media.UriImageSource.UpdateExtensionFromUri()
   at Telerik.Windows.Documents.Media.UriImageSource.GetImageData()
   at Telerik.Windows.Documents.Media.UriImageSource.get_Data()
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExportContext.GetImageSource(ImageSource imageSource)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportImageInline(ImageInline imageInline, Block block)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportInline(RadFixedDocumentEditor editor, InlineBase inline, Block block)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportInlines(RadFixedDocumentEditor editor, Paragraph paragraph, Block block)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportParagraph(RadFixedDocumentEditor editor, Paragraph paragraph, Paragraph nextParagraph, Boolean isFirstBlockInContainer)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportBlock(RadFixedDocumentEditor editor, BlockBase block, BlockBase nextBlock, Boolean isFirstBlockInContainer)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.<ExportBlockContainer>d__5.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportSection(Section section, RadFixedDocumentEditor editor)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.ExportDocument(RadFlowDocument document, RadFixedDocumentEditor editor)
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.Export.PdfExporter.Export()
   at Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
   at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
   at LS.TMMsgViewer.Services.PdfGenerator.ExportToStream(Stream stream) in C:\ls\pvminiserver\LS.TMMsgViewer\Services\PdfGenerator.cs:line 63

 

The HTML contains this fragment, I suspect the URL in the "src" attribute is what's causing the problem:

 

<p class=MsoNormal>
            <img border=0 width=1 height=1 id="_x0000_i1033" src="https://t.myvisualiq.net/sync?prid=Test&amp;ao=0&amp;red=https://ad.doubleclick.net/ddm/trackimp/N7121.2426714VISUALIQ0/B20904629.217713024;dc_trk_aid=415907722;dc_trk_cid=99313089;ord=%20180907151105;u=25_CE_35_NFA180907|VIQ_$%7bUUID%7d|;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?" alt=Advertisement>
            <o:p></o:p>
         </p>

 

Is there a setting to ignore malformed URLs (instead of crashing)?

Thanks.

Marcel
Top achievements
Rank 1
Iron
 answered on 06 Jul 2020
0 answers
197 views
Hi
 
is it possible to change the font in the ReportViewer at run time ?
 
Did it in the RadGridView at run time with the following code and functioned:
 
Private Sub RadFontDropDownList1_TextChanged(sender As Object, e As EventArgs) Handles RadFontDropDownList1.TextChanged
Dim fnt As Font
fnt = RadGridView1.Font
RadGridView1.Font = New System.Drawing.Font(RadFontDropDownList1.SelectedFont, RadDropDownList2.Text)
End Sub
 
I would like to change the font in the RadGridView that it also
in the ReportViewer.
Andi
Top achievements
Rank 1
 asked on 04 Jul 2020
1 answer
332 views

Hello,

In run-time how to rotate a "Radlabel" in 90°, 180°, 270° angle in c# code? 

Nadya | Tech Support Engineer
Telerik team
 answered on 03 Jul 2020
4 answers
304 views
Hey,
Is it possible to display a radlabel with a 45° angle ?
thanks
Nadya | Tech Support Engineer
Telerik team
 answered on 03 Jul 2020
2 answers
147 views

Hi

Is it possible to use the RichTextEditor (in WinForms) to edit the source/the formatting of the rich text? Much like the HTML view of the comparable ASP.Net control? 

There are sometimes when it is hard to understand why some formatting are applied specially when doing copy-and-paste.

I found the ToggleFormattingSymbolsCommand but while it is showing some code, it doesn't show them all and doesn't make the editing easier.

Eric Moreau
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 02 Jul 2020
2 answers
706 views

I have a radgridview element where I need to programmatically insert a new row into the child structure of a certain parent row. The behavior would be the same as if I add a row from the add new row (UserAddNewRow). The final result should be equivalent to the row 'NEW ROW' in the attached image.

Thank you.

Pablo
Top achievements
Rank 1
 answered on 02 Jul 2020
8 answers
590 views
Hi
I have the following code ..
 
Private Sub RadGridView1_CellFormatting (sender As Object, e As UI.CellFormattingEventArgs) Handles RadGridView1.CellFormatting
 
  If e.CellElement.ColumnInfo.Name = "Document" Then
  e.CellElement.ForeColor = Color.Red
 
  Else
  e.CellElement.ResetValue (LightVisualElement.ForeColorProperty, ValueResetFlags.Local)
  End if
         
  If e.CellElement.ColumnInfo.Name = "Document" Then
  If e.CellElement.RowInfo.Cells ("Document"). Value> = RadTextBox4.Text And e.CellElement.RowInfo.Cells ("Document"). Value <= RadTextBox5.Text Then
 
 
   e.CellElement.DrawFill = True
   e.CellElement.BackColor = Color.Yellow
   e.CellElement.ForeColor = Color.Blue
   e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Radial
   e.CellElement.Font = New Font ("Book Antiqua", 12.75 !, FontStyle.Bold)
 
 
    End if
    End if
End Sub
 
works perfectly !
Now I would like to add only the sum in the "Document" column that only e.CellElement.BackColor = Color.Yellow or also e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Radial have.
 
I would like to have this sum displayed in radlabel3.text, how do I get it there?
Nadya | Tech Support Engineer
Telerik team
 answered on 02 Jul 2020
16 answers
2.4K+ views
In the following thread I received help on creating a subclassed TimePicker bound to a TimeSpan CLR type:

http://www.telerik.com/community/forums/winforms/gridview/timepicker-column-in-radgridview-at-runtime.aspx

The app is using this custom editor to enter default personnel schedules. It would be very labor-saving to copy the ArriveTime and/or DepartTime on Monday and simply paste it into the corresponding cell in the rows below. That is my goal, and the users' wish, but it is not working for the following series of reasons:

I am marking the row as "dirty" (i.e. needs to be persisted) in the CellValueChanged event and then later testing to see if the row is dirty in the RowValidating event, and if so, I save it to the database. The aim here is to avoid much unnecessary database i/o; only "dirty" rows are written to the database.  However, the paste operation does not cause the CellValueChanged event to fire, and so the row is never marked as having been changed. 

QUESTION: Is there a code change I can make to the TimePicker that would cause a paste operation to fire the CellValueChanged  event?

void DFGRID_CellValueChanged(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
        {
            e.Row.Tag = "dirty";
        }


Todor
Telerik team
 answered on 02 Jul 2020
7 answers
1.1K+ views

Hello. I searched for similar problems in the threads but can't find one that solves my problem.

My form's KeyPreview property is set to true, and I have a code for Form_KeyDown event as follows:

private void Form_KeyDown(Object eventSender, KeyEventArgs eventArgs)
{
        ...some code
}

Now, when I press the ESC key inside one of the cells in edit mode, I expect the Form_KeyDown event to fire. But in this case, it does not. It only fires when the grid is not in edit mode.

How can I automatically trigger these form key events from the editors, without manually calling them from CellEditorInitialized?

 

Thank you in advance.

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Jul 2020
1 answer
159 views

Is there a best way to clear contents of an unbound grid without removing the rows/columns?

RadGridView.Rows.Clear() is not desirable because it deletes the actual rows.

Nadya | Tech Support Engineer
Telerik team
 answered on 01 Jul 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?