Class OpenFileDialog
Prompts the user to open a file.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Spreadsheet.UI
Assembly: Telerik.WinControls.RadSpreadsheet.dll
Syntax
public class OpenFileDialog
Constructors
OpenFileDialog()
Initializes an instance of the Telerik.WinControls.Spreadsheet.UI.OpenFileDialog class.
Declaration
public OpenFileDialog()
OpenFileDialog(OpenFileDialog)
Initializes an instance of the Telerik.WinControls.Spreadsheet.UI.OpenFileDialog class by given parameter of type System.Windows.Forms.OpenFileDialog.
Declaration
public OpenFileDialog(OpenFileDialog dialog)
Parameters
System.Windows.Forms.OpenFileDialog
dialog
The open file dialog. |
Properties
FileName
Gets or sets a string containing the file name selected in the file dialog box.
Declaration
public string FileName { get; set; }
Property Value
System.String
|
Filter
Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.
Declaration
public string Filter { get; set; }
Property Value
System.String
|
SafeFileName
Gets the file name and extension for the file selected in the dialog box. The file name does not include the path.
Declaration
public string SafeFileName { get; set; }
Property Value
System.String
The file name and extension for the file selected in the dialog box. The file name does not include the path. The default value is an empty string. |
Methods
OpenFile()
Opens the file selected by the user, with read-only permission. The file is specified by the System.Windows.Forms.FileDialog.FileName property.
Declaration
public Stream OpenFile()
Returns
System.IO.Stream
A System.IO.Stream that specifies the read-only file selected by the user. |
ShowDialog()
Runs a common dialog box with a default owner.
Declaration
public bool ShowDialog()
Returns
System.Boolean
true if the DialogResult is OK or Yes; otherwise false |