I am using the RadBrowseEditior to select image files. I have coded the object to make sure the selected file is only one of the following:
*.BMP, *.GIF, *.PNG, *.JPG
I would also like the open file dialog box to have those items set as the shown files. Is there a setting to mask the file types in the file picker?
4 Answers, 1 is accepted
0
Hello Ben,
Thank you for writing.
If the RadBrowseEditor.DialogType property is set to OpenFileDialog, it will use the OpenFileDialog for selecting a file. You can apply a filter to specify the allowed files:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik by Progress
Thank you for writing.
If the RadBrowseEditor.DialogType property is set to OpenFileDialog, it will use the OpenFileDialog for selecting a file. You can apply a filter to specify the allowed files:
this
.radBrowseEditor1.DialogType = Telerik.WinControls.UI.BrowseEditorDialogType.OpenFileDialog;
OpenFileDialog dialog = (OpenFileDialog)radBrowseEditor1.Dialog;
dialog.Filter =
"JPEG Files (*.jpeg)|*.jpeg|PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif"
;
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
0
Ben
Top achievements
Rank 1
answered on 07 Oct 2016, 01:46 PM
that did the trick. Thank you.
0
Raji
Top achievements
Rank 1
answered on 06 Jan 2018, 05:15 AM
how about for saving?
0
Hello, Raji,
Thank you for writing.
For the SaveFileDialog you can refer to the following code snippet:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
Thank you for writing.
For the SaveFileDialog you can refer to the following code snippet:
this
.radBrowseEditor1.DialogType = Telerik.WinControls.UI.BrowseEditorDialogType.SaveFileDialog;
SaveFileDialog dialog = (SaveFileDialog)radBrowseEditor1.Dialog;
dialog.Filter =
"JPEG Files (*.jpeg)|*.jpeg|PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif"
;
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.