Hi Brian,
I am afraid, this feature is currently not available in the EditControl. The Open and SaveAs dialogs in the current EditControl lets you load or save files of any extension or type respectively.
However, this can be accomplished easily if you have source code by changing the Open and SaveAs methods in the FileEditControl class (in FileEditControl.cs file) as shown below (note that filter being set for C# files):
public virtual void LoadFile()
{
m_openDialog.Filter = "C# Files (*.cs)|*.cs" ;
DialogResult result = m_openDialog.ShowDialog( FindForm() as IWin32Window );
if( result == DialogResult.OK )
LoadFile( m_openDialog.FileName );
}
public virtual bool SaveAs()
{
m_saveDialog.Filter = "C# Files (*.cs)|*.cs" ;
DialogResult result = m_saveDialog.ShowDialog( FindForm() as IWin32Window );
if( result != DialogResult.OK ) return false;
SaveFile( m_saveDialog.FileName );
return true;
}
We have also considered adding a bool property like FileFilterEnabled to the EditControl, which when set to true will filter files in SaveAs and Open file dialogs, i.e., it will display only those files that are associated with the currently loaded configuration settings and all others are filtered out. You could track the progress of this feature request at this link below :
Feature Request #418 - Support for FileFilterEnabled property in the EditControl
Let me know if you need any other information. We appreciate your patience and thanks for your interest in Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.