DevExpress 如何读取当前目录下文件,加载至grid

时间:2023-01-04 12:02:25

DBFileName=DevExpress.Utils.FileHelper.FindingFileName(Appliaction.StartupPath,"Data\\Product>xml");

if(DBFileName != "")

{
DataSet dataSet = new DataSet();
dataSet.ReadXml(DBFileName);
gridControl1.DataSource = dataView = dataSet.Tables[0].DefaultView;
}