本文整理汇总了C#中System.Windows.Forms.DataGridViewButtonColumn类的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewButtonColumn类的具体用法?C# DataGridViewButtonColumn怎么用?C# DataGridViewButtonColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridViewButtonColumn类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewButtonColumn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SearchButton_Click
private void SearchButton_Click(object sender, EventArgs e)
{
CargarRoles();
if (TablaRoles.Rows.Count == 0)
{
MessageBox.Show("No se han encontrado roles");
return;
}
this.DataGrid_Roles.Columns.Clear();
this.DataGrid_Roles.DataSource = TablaRoles;
this.DataGrid_Roles.Visible = true;
this.DataGrid_Roles.Columns["id_Rol"].Visible = false;
this.DataGrid_Roles.Columns["isActive"].Visible = false;
DataGridViewButtonColumn btn = new DataGridViewButtonColumn();
this.DataGrid_Roles.Columns.Add(btn);
btn.HeaderText = "Action";
if (Flag_deletion)
{
btn.Text = "Delete";
}
else
{
btn.Text = "Select";
}
btn.Name = "row_button";
btn.UseColumnTextForButtonValue = true;
}
开发者ID:ccantero,项目名称:gdatos_EnerLand,代码行数:31,代码来源:SearchRol.cs
示例2: AddButtonColumn
public static void AddButtonColumn(DataGridView grid,bool IsAddColumn)
{
if (!IsAddColumn)
{
System.Windows.Forms.DataGridViewCellStyle buttonCellStyle = new System.Windows.Forms.DataGridViewCellStyle();
buttonCellStyle.BackColor = System.Drawing.Color.Silver;
DataGridViewButtonColumn getNewColumn = new DataGridViewButtonColumn();
getNewColumn.DefaultCellStyle = buttonCellStyle;
getNewColumn.HeaderText = "取新";
getNewColumn.Name = "NewButton";
getNewColumn.UseColumnTextForButtonValue = true;
getNewColumn.Text = "取新";
getNewColumn.Width = 60;
grid.Columns.Add(getNewColumn);
DataGridViewButtonColumn getOldColumn = new DataGridViewButtonColumn();
getOldColumn.DefaultCellStyle = buttonCellStyle;
getOldColumn.Name = "OldButton";
getOldColumn.UseColumnTextForButtonValue = true;
getOldColumn.HeaderText = "取旧";
getOldColumn.Text = "取旧";
getOldColumn.Width = 60;
grid.Columns.Add(getOldColumn);
}
}
开发者ID:BlueSky007,项目名称:Demo55,代码行数:26,代码来源:GridControl.cs
示例3: hacerQuery
public void hacerQuery(string query, DataGridView dataGrid)
{
ConexionSQL conn = new ConexionSQL();
DataTable dt = conn.cargarTablaSQL(query);
if (dataGrid.DataSource != null) dataGrid.Columns.Remove("seleccionar");
dataGrid.DataSource = dt;
if (dt.Rows.Count == 0)
{
MessageBox.Show("No se han encontrado resultados en la consulta", "Fallo la busqueda", MessageBoxButtons.OK);
dataGrid.DataSource = null;
}
else
{
DataGridViewButtonColumn boton = new DataGridViewButtonColumn();
boton.Name = "Seleccionar";
boton.HeaderText = "Seleccionar";
boton.Text = "Seleccionar";
boton.UseColumnTextForButtonValue = true;
dataGrid.Columns.Insert(dataGrid.Columns.Count, boton);
dataGrid.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.None;
dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGrid.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
}
}
开发者ID:Leonardo-Rocca,项目名称:TP-GDD-Aerolinea,代码行数:27,代码来源:ModificarEliminarRuta.cs
示例4: buttonOpenXml_Click
private void buttonOpenXml_Click(object sender, EventArgs e)
{
#region 打开文件
OpenFileDialog _fileDialog = new OpenFileDialog();
_fileDialog.Title = "请选择一个数据文件";
_fileDialog.FileName = "";
_fileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
_fileDialog.Filter = "Xml 文件(*.xml)|*.xml";
_fileDialog.ValidateNames = true;
_fileDialog.CheckFileExists = true;
_fileDialog.CheckPathExists = true;
string _strName = "";
if (_fileDialog.ShowDialog() == DialogResult.OK)
{
_strName = _fileDialog.FileName;
this.textBoxXmlPath.Text = _strName;
}
if (_strName == "")
{
return;
}
#endregion
#region 后续文件操作
this.treeView.Nodes.Clear();
this.LoadXml(_strName);
DataGridViewButtonColumn _col = new DataGridViewButtonColumn();
_col.HeaderText = "";
#endregion
}
开发者ID:showermj,项目名称:ExcelToXml,代码行数:33,代码来源:ExcelToXml.cs
示例5: FrmInscripcion
public FrmInscripcion()
{
InitializeComponent();
ConfigureForm();
dataGridView1.AutoGenerateColumns = false;
dataGridView1.AutoSize = true;
dataGridView1.DataSource = bindingSource1;
DataGridViewColumn column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "NOMBRE";
column.Name = "NOMBRE";
dataGridView1.Columns.Add(column);
column = new DataGridViewCheckBoxColumn();
column.DataPropertyName = "CARRERA";
column.Name = "CARRERA";
dataGridView1.Columns.Add(column);
column = new DataGridViewCheckBoxColumn();
column.DataPropertyName = "NIVEL";
column.Name = "NIVEL";
dataGridView1.Columns.Add(column);
DataGridViewButtonColumn column2 = new DataGridViewButtonColumn();
column2.DataPropertyName = "INSCRIBIR";
column2.Name = "INSCRIBIR";
column2.HeaderText = "INSCRIBIR";
column2.ToolTipText = "INSCRIBIR";
dataGridView1.Columns.Add(column2);
}
开发者ID:antonianemi,项目名称:FULL,代码行数:30,代码来源:FrmInscripcion.cs
示例6: charger_utilisateur
private void charger_utilisateur()
{
requete = "select * from Utilisateur where pseudo='"+login.ToString()+"' and motDePasse='"+mot_pass.ToString()+"'";
DataSet utilisateur = MaConnexion.ExecuteSelect(connectionString, requete);
if (utilisateur != null)
{
foreach (DataRow row in utilisateur.Tables[0].Rows)
{
Login.Text = row[1].ToString();
Password.Text = row[2].ToString();
NOM.Text = row[3].ToString();
Prenom.Text = row[4].ToString();
id_utilisateur = int.Parse(row[0].ToString());
}
}
requete = "select priv,droit from attribuer join privilege on attribuer.id_priv= privilege.id_priv join droit on droit.id_droit=attribuer.id_droit and id_utilisateur=" + id_utilisateur;
DataSet privilege = MaConnexion.ExecuteSelect(connectionString, requete);
dgvDroits.DataSource = privilege.Tables[0];
DataGridViewButtonColumn col = new DataGridViewButtonColumn();
dgvDroits.Columns.Add(col);
}
开发者ID:kimboox44,项目名称:inventaire,代码行数:25,代码来源:modifier_utilisateur.cs
示例7: cargarTurnos
// Método para cargar turnos del profesional
private void cargarTurnos()
{
int fecha = 0;
int fechaMas1 = 0;
int minutosMas15 = @Clinica_Frba.Properties.Settings.Default.Fecha.Minute + 15;
fecha += @Clinica_Frba.Properties.Settings.Default.Fecha.Day;
fecha += @Clinica_Frba.Properties.Settings.Default.Fecha.Month * 100;
fecha += @Clinica_Frba.Properties.Settings.Default.Fecha.Year * 10000;
fechaMas1 = fecha + 1;
SqlConnection conexion = SQL_Methods.IniciarConnection();
string query = "SELECT Cod_Turno, Fecha FROM ORACLE_FANS.Turnos " +
"WHERE Matricula = " + matricula.Text + " " +
"AND habilitado = 0 " +
"AND Fecha >= '" + fecha.ToString() + " " + @Clinica_Frba.Properties.Settings.Default.Fecha.Hour.ToString() + ":" + minutosMas15.ToString() + ":" + @Clinica_Frba.Properties.Settings.Default.Fecha.Second.ToString() + "' " +
"AND Fecha < '" + fechaMas1.ToString() + "'";
turnos = SQL_Methods.EjecutarProcedure(conexion, query);
dataGridView1.Columns.Clear();
dataGridView1.AllowUserToAddRows = false;
dataGridView1.DataSource = turnos;
dataGridView1.Visible = true;
DataGridViewButtonColumn boton = new DataGridViewButtonColumn();
this.dataGridView1.Columns.Add(boton);
boton.HeaderText = "Action";
boton.Text = "Ingresar Afiliado";
boton.Name = "row_button";
boton.UseColumnTextForButtonValue = true;
dataGridView1.Columns[1].Width = 150;
dataGridView1.Columns[2].Width = 100;
}
开发者ID:ccantero,项目名称:gdatos_EnerLand,代码行数:30,代码来源:RegistroLlegadaForm.cs
示例8: InitializeGridView
//初始化GridView
private void InitializeGridView()
{
DataGridViewButtonColumn deleteBtn = new DataGridViewButtonColumn();
deleteBtn.Text = "X";
deleteBtn.Name = "deleteBtn";
deleteBtn.UseColumnTextForButtonValue = true;
deleteBtn.HeaderText = "remove";
deleteBtn.Width = 50;
deleteBtn.DisplayIndex = 2;
_windowGridView.Columns.Add(deleteBtn);
DataGridViewButtonColumn editBtn = new DataGridViewButtonColumn();
editBtn.Text = "Edit";
editBtn.Name = "editBtn";
editBtn.UseColumnTextForButtonValue = true;
editBtn.HeaderText = "edit";
editBtn.Width = 50;
editBtn.DisplayIndex = 3;
_windowGridView.Columns.Add(editBtn);
_windowGridView.Columns["GetImage"].HeaderText = "icon";
_windowGridView.Columns["IsEnable"].HeaderText = "enable";
_windowGridView.Columns["Name"].HeaderText = "name";
_windowGridView.Columns["IsOpen"].Visible = false;
}
开发者ID:shana0440,项目名称:easy-control-myo-sharp,代码行数:26,代码来源:EasyControl.cs
示例9: BuscarPedidos
private DataSet numMarca; //usado en funcion TModelos
#endregion Fields
#region Constructors
public BuscarPedidos()
{
InitializeComponent();
EN.ENPedidos enPedido = new EN.ENPedidos();
DataSet dsMarc = new DataSet();
dsMarc = enPedido.ObtenerListaMarcas();
numMarca = new DataSet();
numMarca = dsMarc;
DataGridViewButtonColumn buttons = new DataGridViewButtonColumn();
{
buttons.HeaderText = "Editar"; //texto de la columna
buttons.Text = "Editar"; //texto de cada boton, sale al introducir texto
buttons.UseColumnTextForButtonValue = true;
buttons.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
buttons.FlatStyle = FlatStyle.Standard;
buttons.CellTemplate.Style.BackColor = Color.Honeydew;
buttons.DisplayIndex = 0;
}
DataGridViewCheckBoxColumn boton = new DataGridViewCheckBoxColumn();
{
boton.HeaderText = "Eliminar";//texto de la columna
boton.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; //tamaño
boton.DisplayIndex = 0; //indice que ocupara en la tabla
}
TDataGridViewPedidos.Columns.Add(boton);
TDataGridViewPedidos.Columns.Add(buttons);
}
开发者ID:angelguit,项目名称:dpaa-alquilercoches,代码行数:38,代码来源:BuscarPedidos.cs
示例10: BindFieldRangeGrid
void BindFieldRangeGrid()
{
try
{
dataGridView1.DataSource = null;
dataGridView1.Columns.Clear();
dataGridView1.DataSource = rangeList;
dataGridView1.EnableHeadersVisualStyles = false;
if (dataGridView1.Rows.Count > 0)
{
dataGridView1.Rows[0].Cells[0].Selected = false;
}
DataGridViewButtonColumn deleteButtonColumn = new DataGridViewButtonColumn();
deleteButtonColumn.HeaderText = "";
deleteButtonColumn.Name = "delete_column";
deleteButtonColumn.Text = "Delete";
deleteButtonColumn.UseColumnTextForButtonValue = true;
if (dataGridView1.Columns["delete_column"] == null)
{
dataGridView1.Columns.Add(deleteButtonColumn);
}
}
catch (Exception)
{
throw;
}
}
开发者ID:shoaib-ijaz,项目名称:geosoft,代码行数:35,代码来源:RangeRulesControl.cs
示例11: agregarBotonesDGV
private void agregarBotonesDGV()
{
var modificar = new DataGridViewButtonColumn
{
Text = "Modificar",
UseColumnTextForButtonValue = true,
AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
};
var bajaServicio = new DataGridViewButtonColumn
{
Text = "Fuera de Servicio",
UseColumnTextForButtonValue = true,
AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
};
var bajaDefinitiva = new DataGridViewButtonColumn
{
Text = "Baja Definitiva",
UseColumnTextForButtonValue = true,
AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
};
dgvAeronaves.Columns.Add(modificar);
dgvAeronaves.Columns.Add(bajaServicio);
dgvAeronaves.Columns.Add(bajaDefinitiva);
}
开发者ID:MatiGoldman,项目名称:gestionDeDatos,代码行数:25,代码来源:frmABMAeronave.cs
示例12: init
public void init(string database, string username)
{
DataSet ds;
DataGridViewButtonColumn dtGridBt = new DataGridViewButtonColumn();
datafile = database;
dtGridUser.AllowUserToAddRows = true;
int i, cullCount;
string sqlString = "SELECT [Username] AS [Ten nguoi dung], [Locked] AS [Khoa] FROM [QUANLYUSER]";
dbUser = new db(database);
ds = dbUser.genDataset(sqlString);
dtGridUser.DataSource = ds.Tables[0];
dtGridBt.Width = 60;
dtGridBt.Text = "Cap nhat";
dtGridBt.Name = "capnhat";
dtGridBt.UseColumnTextForButtonValue = true;
for (i = 0; i < dtGridUser.Columns.Count; i++)
{
dtGridUser.Columns[i].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dtGridUser.Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
}
dtGridUser.Columns.Add(dtGridBt);
cullCount = dtGridUser.Columns.Count;
for (i = 0; i < dtGridUser.Rows.Count; i++)
{
dtGridUser.Rows[i].Cells[cullCount - 1].Value = "Cap nhat";
}
dtGridUser.AllowUserToAddRows = false;
if (username != "admin")
cmdDelete.Enabled = false;
}
开发者ID:ViniciusConsultor,项目名称:quanlydongtien,代码行数:31,代码来源:Quanlynguoidung.cs
示例13: Book
public Book(DataTable table)
: this()
{
BindingSource bs = new BindingSource();
bs.DataSource = table;
dgvBook.DataSource = bs;
dgvBook.Columns["ID"].Visible = false;
dgvBook.Columns["Name"].HeaderText = "Наименование";
// Автозаполнение только для одной колонки, в будущем возможно потребуется сделать для всех (в цикле)
dgvBook.Columns["Name"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
if (dgvBook.Columns.Contains("IconPath"))
dgvBook.Columns["IconPath"].HeaderText = "Иконка";
// Только для справочника Осадки, добавление колонки с кнопкой
// TODO: 2014-08-30 Disable ToolTip for buttons
var buttonColumn = new DataGridViewButtonColumn();
buttonColumn.Name = "SelectIconBtn";
buttonColumn.HeaderText = string.Empty;
buttonColumn.Width = 22;
buttonColumn.UseColumnTextForButtonValue = true;
buttonColumn.Text = "...";
if (table.TableName == "fallout")
{
dgvBook.Columns.Add(buttonColumn);
}
dgvBook.CellContentClick += dgvBook_CellContentClick;
}
开发者ID:roxocode,项目名称:wether_diary,代码行数:27,代码来源:Book.cs
示例14: filldatagrid
public void filldatagrid()
{
computersDataGrid.Rows.Clear();
computersDataGrid.Columns.Clear();
DataGridViewCell cellStyle = new DataGridViewTextBoxCell();
cellStyle.Style.BackColor = Color.Wheat;
DataGridViewButtonColumn deleteButtonColumn = new DataGridViewButtonColumn();
deleteButtonColumn.Text = "Delete Computer";
deleteButtonColumn.UseColumnTextForButtonValue = true;
DataGridViewButtonColumn updateButtonColumn = new DataGridViewButtonColumn();
updateButtonColumn.Text = "Update Computer";
updateButtonColumn.UseColumnTextForButtonValue = true;
DataGridViewButtonColumn viewComputerButtonColumn = new DataGridViewButtonColumn();
viewComputerButtonColumn.Text = "View computer details";
viewComputerButtonColumn.UseColumnTextForButtonValue = true;
DataGridViewButtonColumn moveComputerButtonColumn = new DataGridViewButtonColumn();
moveComputerButtonColumn.Text = "Move computer";
moveComputerButtonColumn.UseColumnTextForButtonValue = true;
computersDataGrid.Columns.Add(new DataGridViewColumn(cellStyle));
computersDataGrid.Columns.Add(updateButtonColumn);
computersDataGrid.Columns.Add(deleteButtonColumn);
computersDataGrid.Columns.Add(viewComputerButtonColumn);
computersDataGrid.Columns.Add(moveComputerButtonColumn);
foreach (Computer comp in classroom.Computersinclassroom)
computersDataGrid.Rows.Add(comp.Computername);
}
开发者ID:TheGer,项目名称:Examples,代码行数:35,代码来源:ManageComputersForm.cs
示例15: btnBusqueda_Click
private void btnBusqueda_Click(object sender, EventArgs e)
{
string queryFinal = "SELECT R.Rol_Id,R.Rol_Desc,R.Rol_estado FROM NENE_MALLOC.Rol R, NENE_MALLOC.Funcionalidad F ";
Boolean condicion = false;
string condiciones = " WHERE ";
if (!string.IsNullOrEmpty(txtNomRol.Text))
{
condicion = true;
queryFinal += condiciones+ " R.Rol_Desc LIKE '%"+txtNomRol.Text+"%'";
}
if (cBFuncionalidades.SelectedIndex != -1)
{
if (condicion) { queryFinal += " AND F.Func_Desc LIKE '%" + cBFuncionalidades.SelectedItem.ToString() + "%'"; }
else
{
condicion = true;
queryFinal += condiciones +" F.Func_Desc LIKE '%" + cBFuncionalidades.SelectedItem.ToString() + "%'"; }
}
if (cBEstadoRol.SelectedIndex != -1)
{
if (condicion) { queryFinal += " AND R.Rol_Estado LIKE '%" + cBEstadoRol.SelectedItem.ToString() + "%'"; }
else { queryFinal += condiciones+" R.Rol_Estado LIKE '%" + cBEstadoRol.SelectedItem.ToString() + "%'"; }
}
queryFinal += " GROUP BY R.Rol_Id,R.Rol_Desc,R.Rol_estado";
dataGridView1.DataSource = conexion.consulta(queryFinal);
DataGridViewButtonColumn col = new DataGridViewButtonColumn();
col.UseColumnTextForButtonValue = true;
col.Text = "Seleccionar";
col.Name = "Seleccionar";
dataGridView1.Columns.Add(col);
}
开发者ID:gastitan,项目名称:NENE_MALLOC,代码行数:33,代码来源:ListadoRol.cs
示例16: ReceiveManager
public ReceiveManager(MySqlDataReader dataReader,MetroForm _login)
{
InitializeComponent();
login = _login;
this.FormClosing += ReceiveManager_FormClosing;
worker_id = dataReader.GetString("worker_name");
this.Text = "欢迎回来," + dataReader.GetString("worker_name");
dataReader.Close();
DataGridViewButtonColumn request_column = new DataGridViewButtonColumn();
request_column.HeaderText = "请求";
//gigUrlColumn.Name = "Gig Url name";
request_column.Text = "确认";
request_column.UseColumnTextForButtonValue = true;
request_column.Width = 106;
WaitToConfrimDataGridView.Columns.Add(request_column);
WaitToConfrimDataGridView.DataSource = FillDataGrid();
DataGridViewButtonColumn request2_column = new DataGridViewButtonColumn();
request2_column.HeaderText = "请求";
//gigUrlColumn.Name = "Gig Url name";
request2_column.Text = "接货成功";
request2_column.UseColumnTextForButtonValue = true;
request2_column.Width = 106;
CheckGridView.Columns.Add(request2_column);
CheckGridView.DataSource = FillCheckData();
}
开发者ID:SivilTaram,项目名称:BUAA_DataBase,代码行数:26,代码来源:ReceiveManager.cs
示例17: initPartnerKolone
private void initPartnerKolone()
{
DataGridViewColumn col = new DataGridViewTextBoxColumn();
col.Name = "colJIB";
col.HeaderText = "JIB";
col.ToolTipText = "Jedinstveni indentifikacioni broj partnera";
col.FillWeight = 50;
dgPregled.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.Name = "colNaziv";
col.HeaderText = "Naziv partnera";
col.ToolTipText = "Naziv partnera";
col.FillWeight = 150;
dgPregled.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.Name = "colAdresa";
col.HeaderText = "Adresa partnera";
col.FillWeight = 100;
dgPregled.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.Name = "colMjesto";
col.HeaderText = "Mjesto";
col.FillWeight = 80;
dgPregled.Columns.Add(col);
col = new DataGridViewButtonColumn();
col.Name = "colIzmjeni";
col.HeaderText = "Izmjeni";
dgPregled.Columns.Add(col);
dgPregled.CellContentClick += new DataGridViewCellEventHandler(cellContentClick);
}
开发者ID:RockLegend93,项目名称:Veleprodaja,代码行数:30,代码来源:PartnerPregledForm.cs
示例18: updateGrid
public void updateGrid()
{
dataGridView1.Rows.Clear();
dataGridView1.Columns.Clear();
//style for classroom name
DataGridViewCell cellStyle = new DataGridViewTextBoxCell();
cellStyle.Style.BackColor = Color.Wheat;
DataGridViewButtonColumn deleteButtonColumn = new DataGridViewButtonColumn();
deleteButtonColumn.Text = "Delete Classroom";
deleteButtonColumn.UseColumnTextForButtonValue = true;
DataGridViewButtonColumn updateButtonColumn = new DataGridViewButtonColumn();
updateButtonColumn.Text = "Update Classroom";
updateButtonColumn.UseColumnTextForButtonValue = true;
DataGridViewButtonColumn manageComputersButtonColumn = new DataGridViewButtonColumn();
manageComputersButtonColumn.Text = "Manage computers";
manageComputersButtonColumn.UseColumnTextForButtonValue = true;
dataGridView1.Columns.Add(new DataGridViewColumn(cellStyle));
dataGridView1.Columns.Add(new DataGridViewCheckBoxColumn());
dataGridView1.Columns.Add(updateButtonColumn);
dataGridView1.Columns.Add(manageComputersButtonColumn);
dataGridView1.Columns.Add(deleteButtonColumn);
foreach (Classroom classroom in MainProgram.rooms)
dataGridView1.Rows.Add(classroom.Classroomname,classroom.Projectoravailable);
}
开发者ID:TheGer,项目名称:Examples,代码行数:34,代码来源:ClassroomsForm.cs
示例19: BindGridTecajevi
private void BindGridTecajevi()
{
DataTable dt = _polaznik.GetTecajevi();
dgvTecajevi.DataSource = dt;
dgvTecajevi.Columns["PolaznikTecajaID"].Visible = false;
dgvTecajevi.Columns["KonkretniTecajID"].Visible = false;
dgvTecajevi.Columns["PredavacID"].Visible = false;
if (!_gridButtonsAdded)
{
DataGridViewButtonColumn columnEvaluacija = new DataGridViewButtonColumn();
columnEvaluacija.HeaderText = "";
columnEvaluacija.Text = "Evaluacija";
columnEvaluacija.UseColumnTextForButtonValue = true;
columnEvaluacija.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
columnEvaluacija.DisplayIndex = dt.Columns.Count;
dgvTecajevi.Columns.Add(columnEvaluacija);
_evaluacijaColumnIndex = columnEvaluacija.DisplayIndex;
//DataGridViewButtonColumn columnCertifikat = new DataGridViewButtonColumn();
//columnCertifikat.HeaderText = "";
//columnCertifikat.Text = "Certifikat";
//columnCertifikat.UseColumnTextForButtonValue = true;
//col
}
}
开发者ID:ana-pg,项目名称:SEM,代码行数:28,代码来源:frmPolaznik.cs
示例20: ucSubscriptions_Load
private void ucSubscriptions_Load(object sender, EventArgs e)
{
customerBindingSource.DataSource = Customers;
var btn = new DataGridViewButtonColumn { Name = "Add", HeaderText = "", Text = "הוסף תקופה", UseColumnTextForButtonValue = true, Width = 80, AutoSizeMode = DataGridViewAutoSizeColumnMode.None };
dgvClient.Columns.Add(btn);
}
开发者ID:khaikin,项目名称:GymMgr,代码行数:7,代码来源:ucSubscriptions.cs
注:本文中的System.Windows.Forms.DataGridViewButtonColumn类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论