RadBrowseEditior setting file types allowed

3 posts, 0 answers
  1. Ben
    Ben avatar
    11 posts
    Member since:
    Dec 2015

    Posted 03 Oct 2016 Link to this post

    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?

  2. Dess
    Dess avatar
    2166 posts

    Posted 04 Oct 2016 Link to this post

    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:
    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.

    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.
  3. Ben
    Ben avatar
    11 posts
    Member since:
    Dec 2015

    Posted 07 Oct 2016 Link to this post

    that did the trick. Thank you.
Back to Top