private void ucTuDienDuLieu_Load(object sender, EventArgs e) { DataTable dt = DataProvider.ExecQueryStore("sp_UI_GridView_LayTheoMa", new SqlParameter("@MaGridView", _chucNang.MaGridView)); DataRow dr = dt.Rows[0]; #region Init GridView AppGridView.Init(gridViewDuLieu , (bool)XuLyKieuDuLieu.ThayTheNull(dr["MultiSelect"], typeof(bool)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["MultiSelectMode"], typeof(string)) , (bool)XuLyKieuDuLieu.ThayTheNull(dr["ShowDetailButtons"], typeof(bool)) , (bool)XuLyKieuDuLieu.ThayTheNull(dr["ShowGroupPanel"], typeof(bool)) , (int)XuLyKieuDuLieu.ThayTheNull(dr["WordWrapHeader"], typeof(int)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["NewItemRowText"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["GroupPanelText"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["ColumnFields"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["ColumnNames"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["ColumnWidths"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["HideFields"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["ReadOnlyFields"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["FixedFields"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(dr["FixedStyle"], typeof(string)) ); dt = DataProvider.ExecQueryStore("sp_UI_GridView_AlignHeader_LayTheoMa", new SqlParameter("@MaGridView", _chucNang.MaGridView)); foreach (DataRow row in dt.Rows) { AppGridView.AlignHeader(gridViewDuLieu , (string)XuLyKieuDuLieu.ThayTheNull(row["AlignHeaders"], typeof(string)) , (string)XuLyKieuDuLieu.ThayTheNull(row["AlignStyle"], typeof(string)) ); } #endregion }
private void frmQuyen_Load(object sender, System.EventArgs e) { #region gridview AppGridView.Init(gridViewQuyen, true, false, DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CellSelect , true, true, "Nhấn vào đây để thêm dòng mới"); AppGridView.ShowField(gridViewQuyen , new string[] { "MaQuyen", "TenQuyen", "GhiChu" } , new string[] { "Mã quyền", "Tên quyền", "Ghi chú" } , new int[] { 100, 200, 300 }); bsQuyen.DataSource = _dataQuyen.LayDuLieu(); #endregion }