private void Form1_Load(object sender, System.EventArgs e)
 {
     FillDataSet();
     gridControl1.DataSource = dataTable1;
     gridView1.PopulateColumns();
     gridView1.Columns[OrderFieldName].SortOrder = DevExpress.Data.ColumnSortOrder.Ascending;
 }
 private void Form1_Load(object sender, System.EventArgs e)
 {
     InitData();
     gridView1.PopulateColumns();
     gridView1.FocusedColumnChanged += new DevExpress.XtraGrid.Views.Base.FocusedColumnChangedEventHandler(gridView1_FocusedColumnChanged);
     gridView1.FocusedRowChanged    += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(gridView1_FocusedRowChanged);
 }
 private void Form1_Load(object sender, System.EventArgs e)
 {
     FillDataSet();
     gridControl1.DataSource = dataTable1;
     gridView1.PopulateColumns();
     gridView1.OptionsCustomization.AllowSort = false;
     gridView1.OptionsView.ShowGroupPanel     = false;
     new DragHelper(gridView1);
 }
示例#4
0
 private void MyMenuItem(System.Object sender, System.EventArgs e)
 {
     try
     {
         DevExpress.Utils.OptionsLayoutGrid opt = new DevExpress.Utils.OptionsLayoutGrid();
         opt.Columns.StoreAllOptions = true;
         grd_DonVi.MainView.RestoreLayoutFromXml(Application.StartupPath + "\\XML\\grd" + Commons.Modules.sPS.Replace("spGetList", "") + ".xml", opt);
     }catch {
         DevExpress.XtraGrid.Views.Grid.GridView grv = grd_DonVi.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
         grv.PopulateColumns();
     }
 }