Telerik Forums
UI for WinForms Forum
2 answers
193 views

I have a form that loads an existing pdf into a radPdfViewer. The user then has the option to move this file to a new location, with a new file name and then delete the original file.

I am able to load and view the original pdf. I am also able to export this file to a new location with a new file name. The problem occurs when I attempt to delete the original file. I am receiving the error message "The process cannot access the file ... because it is being used by another process."  Obviously I am not disposing of something properly, but I am unsure of the correct steps to take.  Any help would be appreciated.

I am using Visual Studio 2015 and the following code:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        RadPdfViewer1.LoadDocument(OriginalFileName)
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim exportProvider As New Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider
        Dim NewFile As RadFixedDocument = exportProvider.Import(System.IO.File.OpenRead(OriginalFileName))
        Dim out As System.IO.Stream = System.IO.File.OpenWrite(NewFileName)

        exportProvider.Export(NewFile, out)
        out.Flush()
        out.Dispose()
        out.Close()
        NewFile = Nothing
        exportProvider = Nothing
        RadPdfViewer1.UnloadDocument()
        System.IO.File.Delete(OriginalFileName)            ----> this is the line that gives the error
    End Sub

sandra
Top achievements
Rank 1
 answered on 04 Jan 2016
12 answers
257 views
In my project I need change checkboxes for button in CheckedDropDownList  or add buttons in DropDownList. It's possible?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Jan 2016
1 answer
114 views
Using Visual Studio 2013 Update 4
Telerik Winforms version: 2015.2.728.40
Hristo
Telerik team
 answered on 04 Jan 2016
3 answers
218 views

Hi.

How can i change the distance between a CategoricalAxis and its label ?

( my chartview have two horizontalAxis. the top one have this gap problem )

CategoricalAxis gregorianAxis = new CategoricalAxis();
gregorianAxis.LabelFitMode = AxisLabelFitMode.Rotate;
gregorianAxis.LabelRotationAngle = 60;
gregorianAxis.ClipLabels = false;
gregorianAxis.VerticalLocation = AxisVerticalLocation.Top;
mySerie.HorizontalAxis = gregorianAxis;

Hristo
Telerik team
 answered on 04 Jan 2016
1 answer
138 views

Hi,

 If I place a RadLayoutControl into a UserControl, then trying to add any toolbox controls into it,

Visual Studio will crash.

 Using Visual Studio 2013 Update 4

Telerik Winforms version: 2015.2.728.40

If I place RadLayoutControl into a WinForm/RadForm, then try to add controls into it will be fine.

 Looks like the RadLayoutControl needs to reside in a form instead of UserControl? Don't know this is a bug or it is meant to be.

What I'm trying to do is design UserControls which can be loaded into RadDock's document windows at runtime. 

 

Best Regards,

 

Dimitar
Telerik team
 answered on 04 Jan 2016
5 answers
2.2K+ views
I have a Winforms app with a Telerik RadGridView. Our HR dept has employee pictures in a known location on our file server. I am trying to include the employee picture on my RadGrid using the picture file.

I created a column of type ImageColumn as shown:

Dim imageColumn As New GridViewImageColumn
imageColumn.Name = "ImageColumn"
 imageColumn.HeaderText = "Picture"
 imageColumn.ImageLayout = ImageLayout.Zoom
 RadGridView1.MasterTemplate.Columns.Add(imageColumn)

Then I tried to loop through each row of the radGrid and assign a picture to the imageColumn:

For i As Integer = 0 To RadGridView1.Rows.Count - 1
    RadGridView1.Rows(i).Cells("ImageColumn").Value = "c:\myPicture.jpg"
Next

 

Note: In this example I'm simply trying to assign the same picture to every row. Later I will add logic to add the specific picture required.

Running this code produces a blank image column. No error is returned.

I have tried image values of c:\myPicture.jpg, c:\\\myPicture.jpg, and @c:\myPicture.jpg

What am I doing wrong?

I have a Winforms app with a Telerik RadGridView. Our HR dept has employee pictures in a known location on our file server. I am trying to include the employee picture on my RadGrid using the picture file.

I created a column of type ImageColumn as shown:

Dim imageColumn As New GridViewImageColumn
imageColumn.Name = "ImageColumn"
imageColumn.HeaderText = "Picture"
imageColumn.ImageLayout = ImageLayout.Zoom
RadGridView1.MasterTemplate.Columns.Add(imageColumn)

Then I tried to loop through each row of the radGrid and assign a picture to the imageColumn:

For i As Integer = 0 To RadGridView1.Rows.Count - 1
    RadGridView1.Rows(i).Cells("ImageColumn").Value = "c:\myPicture.jpg"
Next

Note: In this example I'm simply trying to assign the same picture to every row. Later I will add logic to add the specific picture required.

Running this code produces a blank image column. No error is returned.

I have tried image values of c:\myPicture.jpgc:\\\myPicture.jpg, and @c:\myPicture.jpg

What am I doing wrong?

I have a Winforms app with a Telerik RadGridView. Our HR dept has employee pictures in a known location on our file server. I am trying to include the employee picture on my RadGrid using the picture file.

I created a column of type ImageColumn as shown:

Dim imageColumn As New GridViewImageColumn
imageColumn.Name = "ImageColumn"
imageColumn.HeaderText = "Picture"
imageColumn.ImageLayout = ImageLayout.Zoom
RadGridView1.MasterTemplate.Columns.Add(imageColumn)

Then I tried to loop through each row of the radGrid and assign a picture to the imageColumn:

For i As Integer = 0 To RadGridView1.Rows.Count - 1
    RadGridView1.Rows(i).Cells("ImageColumn").Value = "c:\myPicture.jpg"
Next

Note: In this example I'm simply trying to assign the same picture to every row. Later I will add logic to add the specific picture required.

Running this code produces a blank image column. No error is returned.

I have tried image values of c:\myPicture.jpgc:\\\myPicture.jpg, and @c:\myPicture.jpg

What am I doing wrong?

Hristo
Telerik team
 answered on 31 Dec 2015
3 answers
616 views

Hi,

 

My goal is putting a flow diagram into our software in accordance with the values that came. It has to be via code. But i couldn't find any documentation about it.

I can put shapes programmatically. However,i have no idea about creating bindings between them by lines, setting up positions without ruining.

If you may give some hints, examples or lead me .i'll be thankful.

 An example attached.

 Regards,

 Onur

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Dec 2015
1 answer
130 views
How can I show some text within RoundRectShape? See the attached image.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Dec 2015
1 answer
107 views

By default, when in Weekview, the scheduler groups by resources, and then days.

Is there a way (or could a way be added) to do the reverse? That is, group by day *first*, and then have each resource under each day?

Thanks!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Dec 2015
1 answer
2.5K+ views

Hi

Unfortunately all Telerik tool box items have disappeared from my tool box

This occurred after I did the following

In place upgrade to windows 10

Installed VS studio Enterprise 2015  (original Dev platform was VS 2013 Premium)

I have tried a number of methods to fix

1:Reset Tool box...results in toolbox items from other vendors showing (As expected)

2:Deleted .tbd files and restarted VS..VS studio advises it rebuilding the tool box. Other vendors tool box items are shown (As expected)

3: Manually added Telerik controls for frame work 4. Each time VS starts the toolbox items need to be re-added

How can I sort this issue?

Andre

Andre
Top achievements
Rank 1
 answered on 30 Dec 2015
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?