public DataGridView ToDataGridView() { ReLoad(); DataTable dt = (_user.RoleSF == RolesSF.Пользователь) ? _lpuList.ToDataTable(_user) : _lpuList.ToDataTable(); _dgv.DataSource = dt; _dgv.Columns[0].Width = 80; _dgv.Columns[1].Width = 122; _dgv.Columns[2].Width = 300; _dgv.Columns[3].Width = 80; _dgv.Columns[4].Width = 80; _dgv.Columns[5].Width = 120; SetStyle(); return(_dgv); }
public DataGridView GetDataGridView(T filter) { ReLoad(); dgv.DataSource = lpuList.ToDataTable(filter); dgv.Location = new Point(10, 142); dgv.Size = new Size(480, 175); dgv.AllowUserToAddRows = false; dgv.AllowUserToDeleteRows = false; dgv.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dgv.ReadOnly = true; dgv.RowHeadersVisible = false; return(dgv); }