本文整理汇总了C#中System.Windows.Forms.DataGridViewTextBoxColumn类的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewTextBoxColumn类的具体用法?C# DataGridViewTextBoxColumn怎么用?C# DataGridViewTextBoxColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridViewTextBoxColumn类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewTextBoxColumn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: fillTrainingBags
private void fillTrainingBags()
{
DataGridViewColumn dgvIndex = new DataGridViewTextBoxColumn();
{
dgvIndex.HeaderText = "Slot";
dgvIndex.DisplayIndex = 0;
dgvIndex.Width = 25;
dgvIndex.ReadOnly = true;
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
}
DataGridViewComboBoxColumn dgvBag = new DataGridViewComboBoxColumn
{
DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing
};
{
foreach (string t in trba)
if (t.Length > 0)
dgvBag.Items.Add(t);
dgvBag.DisplayIndex = 1;
dgvBag.Width = 135;
dgvBag.FlatStyle = FlatStyle.Flat;
}
dataGridView1.Columns.Add(dgvIndex);
dataGridView1.Columns.Add(dgvBag);
dataGridView1.Rows.Add(12);
int offset = Main.SAV.SuperTrain + 0x308;
for (int i = 0; i < 12; i++)
{
dataGridView1.Rows[i].Cells[0].Value = (i + 1).ToString();
dataGridView1.Rows[i].Cells[1].Value = trba[sav[offset + i]];
}
}
开发者ID:Bluestar012,项目名称:PKHeX,代码行数:34,代码来源:SAV_SuperTrain.cs
示例2: TimelineView
public TimelineView(TimelineController controller_)
{
controller = controller_;
controller.TimelineUpdate += controller_TimelineUpdate;
controller.CurrentTimeUpdate += controller_CurrentTimeUpdate;
textWidth = 100;
barWidth = 100;
SetupUI();
this.MouseDown += TimelineView_MouseDown;
this.VisibleChanged += TimelineView_VisibleChanged;
this.Move += TimelineView_Move;
this.FormClosing += TimelineView_FormClosing;
typeof(DataGridView).
GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic).
SetValue(dataGridView, true, null);
dataGridView.SelectionChanged += (object sender, EventArgs args) => dataGridView.ClearSelection();
dataGridView.AutoGenerateColumns = false;
dataGridView.Columns.Add(textColumn = new DataGridViewTextBoxColumn { DataPropertyName = "Name", AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill });
dataGridView.Columns.Add(timeLeftColumn = new TimeLeftColumn { Controller = controller_ });
MyOpacity = 0.8;
NumberOfRowsToDisplay = 3;
MoveByDrag = true;
ShowOverlayButtons = true;
UpdateLayout();
soundplayer = new CachedSoundPlayer();
TimelineFont = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Bold);
}
开发者ID:RainbowMage,项目名称:act_timeline,代码行数:34,代码来源:TimelineView.cs
示例3: InitializeParameterGrid
private void InitializeParameterGrid()
{
MethodParametersGrid.AutoGenerateColumns = false;
MethodParametersGrid.Columns.Clear();
MethodParametersGrid.DataSource = _parameters;
MethodParametersGrid.AlternatingRowsDefaultCellStyle.BackColor = Color.Lavender;
MethodParametersGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
var paramNameColumn = new DataGridViewTextBoxColumn
{
Name = "Name",
DataPropertyName = "Name",
HeaderText = RubberduckUI.Name,
ReadOnly = true
};
var paramTypeColumn = new DataGridViewTextBoxColumn
{
Name = "TypeName",
DataPropertyName = "TypeName",
HeaderText = RubberduckUI.Type,
ReadOnly = true
};
var paramPassedByColumn = new DataGridViewTextBoxColumn
{
Name = "Passed",
AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill,
HeaderText = RubberduckUI.Passed,
DataPropertyName = "Passed",
ReadOnly = true
};
MethodParametersGrid.Columns.AddRange(paramNameColumn, paramTypeColumn, paramPassedByColumn);
}
开发者ID:retailcoder,项目名称:Rubberduck,代码行数:35,代码来源:ExtractMethodDialog.cs
示例4: generarGrilla
private void generarGrilla()
{
DataGridViewTextBoxColumn ColDia = new DataGridViewTextBoxColumn();
ColDia.DataPropertyName = "StringDia";
ColDia.HeaderText = "Día";
ColDia.Width = 120;
grillaAgenda.Columns.Add(ColDia);
DataGridViewTextBoxColumn ColHoraDesde = new DataGridViewTextBoxColumn();
ColHoraDesde.DataPropertyName = "HoraDesde";
ColHoraDesde.HeaderText = "Hora Desde";
ColHoraDesde.Width = 120;
grillaAgenda.Columns.Add(ColHoraDesde);
DataGridViewTextBoxColumn ColHoraHasta = new DataGridViewTextBoxColumn();
ColHoraHasta.DataPropertyName = "HoraHasta";
ColHoraHasta.HeaderText = "Hora Hasta";
ColHoraHasta.Width = 120;
grillaAgenda.Columns.Add(ColHoraHasta);
DataGridViewTextBoxColumn ColEspecialidad = new DataGridViewTextBoxColumn();
ColEspecialidad.DataPropertyName = "EspString";
ColEspecialidad.HeaderText = "Especialidad";
ColEspecialidad.Width = 120;
grillaAgenda.Columns.Add(ColEspecialidad);
}
开发者ID:urielpeta,项目名称:GDD-tp-20132c,代码行数:26,代码来源:lstSeleccionAgenda.cs
示例5: ConfigurarColunasPrincipais
protected void ConfigurarColunasPrincipais()
{
DataGridViewTextBoxColumn IDAmbiente = new DataGridViewTextBoxColumn();
DataGridViewTextBoxColumn Cor = new DataGridViewTextBoxColumn();
DataGridViewTextBoxColumn Descricao = new DataGridViewTextBoxColumn();
IDAmbiente.DataPropertyName = "IDAmbiente";
IDAmbiente.HeaderText = "ID";
IDAmbiente.Name = "IDAmbiente";
IDAmbiente.ReadOnly = true;
IDAmbiente.Width = 49;
Cor.DataPropertyName = "Cor";
Cor.HeaderText = "Cor";
Cor.Name = "Cor";
Cor.ReadOnly = true;
Cor.Width = 77;
Descricao.DataPropertyName = "Descricao";
Descricao.HeaderText = "Descrição";
Descricao.Name = "Descricao";
Descricao.ReadOnly = true;
Descricao.Width = 77;
Descricao.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
colunasAdicionadas = true;
dtgDados.Columns.AddRange(new DataGridViewColumn[] {
IDAmbiente, Cor, Descricao
});
}
开发者ID:hempmax,项目名称:AtualDiaria,代码行数:30,代码来源:UscAmbiente.cs
示例6: InitGridColumns
private void InitGridColumns(DateTime begin, DateTime end)
{
if (_DateColumns != null && _DateColumns.Count > 0)
{
foreach (DataGridViewColumn col in _DateColumns)
{
this.GridView.Columns.Remove(col);
}
_DateColumns.Clear();
}
while (end >= begin)
{
DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn();
col.Tag = begin;
col.Width = 30;
col.ReadOnly = true;
col.SortMode = DataGridViewColumnSortMode.NotSortable;
col.AutoSizeMode = DataGridViewAutoSizeColumnMode.NotSet;
col.HeaderText = begin.Day.ToString("D2");
if (HolidaySetting.Current != null && (HolidaySetting.Current.IsHoliday(begin) || HolidaySetting.Current.IsWeekend(begin)))
{
col.DefaultCellStyle.BackColor = Color.LightGray;
}
else
{
col.DefaultCellStyle.BackColor = Color.White;
}
_DateColumns.Add(col);
begin = begin.AddDays(1);
}
for (int i = 0; i < _DateColumns.Count; i++)
{
GridView.Columns.Insert(i + 1, _DateColumns[i]);
}
}
开发者ID:chendeben,项目名称:508-Attendance,代码行数:35,代码来源:FrmShiftArrange.cs
示例7: BindearDetalle
private void BindearDetalle()
{
// Initialize the DataGridView.
bsCotizacionDetalle.DataSource = new List<CotizacionDetalle>();
dgvCotizacion.AutoGenerateColumns = false;
dgvCotizacion.AllowUserToAddRows = false;
dgvCotizacion.AutoSize = true;
dgvCotizacion.DataSource = bsCotizacionDetalle;
// Initialize and add a text box column.
DataGridViewColumn column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Renglon";
column.Name = "Renglon";
column.ReadOnly = true;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "CveArt";
column.Name = "Articulo";
column.ReadOnly = true;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "DescripcionArt";
column.Width = 150;
column.Name = "Descripcion";
column.ReadOnly = true;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "PresentacionArt";
column.Name = "Presentacion";
column.ReadOnly = true;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Cantidad";
column.Name = "Cantidad";
column.ReadOnly = true;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Precio";
column.Name = "Precio Unitario";
column.Width = 75;
column.ReadOnly = false;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Marca";
column.Name = "Marca";
column.ReadOnly = false;
dgvCotizacion.Columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Observaciones";
column.Name = "Observaciones";
column.ReadOnly = false;
dgvCotizacion.Columns.Add(column);
}
开发者ID:bulbix,项目名称:adquisiciones,代码行数:60,代码来源:frmCotizacion.cs
示例8: LoadAccounts
private void LoadAccounts()
{
accountGrid.Columns.Clear();
accountGrid.AutoGenerateColumns = false;
accountGrid.DataSource = null;
DataGridViewColumn realm = new DataGridViewTextBoxColumn();
realm.DataPropertyName = "Realm";
realm.Name = "Realm";
realm.HeaderText = "Realm";
accountGrid.Columns.Add(realm);
DataGridViewColumn Faction = new DataGridViewTextBoxColumn();
Faction.DataPropertyName = "Faction";
Faction.Name = "Faction";
Faction.HeaderText = "Faction";
accountGrid.Columns.Add(Faction);
DataGridViewColumn CharName = new DataGridViewTextBoxColumn();
CharName.DataPropertyName = "Name";
CharName.Name = "Name";
CharName.HeaderText = "Name";
accountGrid.Columns.Add(CharName);
DataGridViewColumn gold = new DataGridViewTextBoxColumn();
gold.DataPropertyName = "Gold";
gold.Name = "Gold";
gold.HeaderText = "Gold";
accountGrid.Columns.Add(gold);
}
开发者ID:Richterr,项目名称:GoldParser,代码行数:26,代码来源:MainForm.cs
示例9: dgvDataFormat
private void dgvDataFormat()
{
dgvData.Columns["ChkID"].Visible = false;
DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn();
col.Name = "自主檢查";
col.HeaderText = "自主檢查";
dgvData.Columns.Add(col);
dgvData.Columns["自主檢查"].DisplayIndex = 6;
for(int i = 0; i < dgvData.Rows.Count - 1; i++)
{
if (Convert.ToInt32(dgvData.Rows[i].Cells["ChkID"].Value) == 0)
{
dgvData.Rows[i].Cells["自主檢查"].Value = "首件";
}
else
{
dgvData.Rows[i].Cells["自主檢查"].Value = "製程中";
}
}
dgvData.Columns["日期"].Width = 145;
dgvData.Columns["料號"].Width = 100;
dgvData.Columns["版序"].Width = 60;
dgvData.Columns["批號"].Width = 100;
dgvData.Columns["層別"].Width = 60;
dgvData.Columns["數量"].Width = 60;
dgvData.Columns["檢驗數量"].Width = 90;
dgvData.Columns["氧化/水痕"].Width = 90;
dgvData.Columns["刮傷"].Width = 60;
dgvData.Columns["膜皺"].Width = 60;
dgvData.Columns["膜偏留邊"].Width = 90;
dgvData.Columns["板面氣泡"].Width = 90;
dgvData.Columns["判定"].Width = 60;
dgvData.Columns["檢驗人員"].Width = 90;
dgvData.Columns["備註"].Width = 150;
}
开发者ID:coreychen71,项目名称:EWPCB-Project,代码行数:35,代码来源:壓膜生產日報查詢.cs
示例10: MazeGUI_Example
public MazeGUI_Example(int x, int y, int selfx, int selfy, int goalx, int goaly)
{
InitializeComponent();
Width = 60 + x * 25;
Height = 60 + y * 25;
for (int i = 0; i < x; i++)
{
DataGridViewColumn c = new DataGridViewTextBoxColumn();
c.Name = "" + i;
c.HeaderText = "" + i;
c.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
c.FillWeight = Math.Max(1, 100 / x);
grid.Columns.Add(c);
}
for (int i = 0; i < y; i++)
{
grid.Rows.Add("");
grid.Rows[i].HeaderCell.Value = "" + i;
}
SetSelf(selfx, selfy);
SetGoal(goalx, goaly);
KeyDown += (o, s) => { OK_Click(); };
grid.KeyDown += (o, s) => { OK_Click(); };
}
开发者ID:vkarthi46,项目名称:QLearner,代码行数:27,代码来源:MazeGUI_Example.cs
示例11: InitGrid
private void InitGrid()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmExport));
// add column thuoc
var clId = new DataGridViewTextBoxColumn { HeaderText = "Id", DataPropertyName = "Id", Name = "Id" };
clId.Visible = false;
grd.Columns.Add(clId);
var clType = new DataGridViewTextBoxColumn { HeaderText = "Nhập/Xuất kho", DataPropertyName = "TypeName", Name = "TypeName" };
grd.Columns.Add(clType);
var clmInStock = new DataGridViewTextBoxColumn { HeaderText = "Ngày nhập/xuất", DataPropertyName = "Date", Name = "Date" };
clmInStock.ReadOnly = true;
clmInStock.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
grd.Columns.Add(clmInStock);
var clmNo = new DataGridViewTextBoxColumn { HeaderText = "Mã chứng từ", DataPropertyName = "No", Name = "No" };
clmNo.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
grd.Columns.Add(clmNo);
var clmDeliverer = new DataGridViewTextBoxColumn { HeaderText = "Người giao", DataPropertyName = "Deliverer", Name = "Deliverer" };
clmDeliverer.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
grd.Columns.Add(clmDeliverer);
var clmNote = new DataGridViewTextBoxColumn { HeaderText = "Chú thích", DataPropertyName = "Note", Name = "Note" };
clmNote.ReadOnly = true;
clmNote.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
grd.Columns.Add(clmNote);
}
开发者ID:kiemhieu,项目名称:medicine-website,代码行数:30,代码来源:frmWHPageHistory.cs
示例12: BuildDataGridViewStructure
private void BuildDataGridViewStructure()
{
dgvList.AllowUserToAddRows = false;
dgvList.MultiSelect = false;
dgvList.AllowUserToResizeRows = false;
dgvList.ReadOnly = true;
dgvList.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dgvList.AutoGenerateColumns = false;
DataGridViewTextBoxColumn id = new DataGridViewTextBoxColumn();
id.DisplayIndex = 0;
id.Name = "Id";
id.ReadOnly = true;
id.HeaderText = "Id";
id.DataPropertyName = "Id";
DataGridViewTextBoxColumn name = new DataGridViewTextBoxColumn();
name.DisplayIndex = 1;
name.Name = "Name";
name.ReadOnly = true;
name.HeaderText = "Name";
name.DataPropertyName = "Name";
DataGridViewCheckBoxColumn enabled = new DataGridViewCheckBoxColumn();
enabled.DisplayIndex = 2;
enabled.Name = "Enabled";
enabled.ReadOnly = true;
enabled.HeaderText = "Enabled";
enabled.DataPropertyName = "Enabled";
dgvList.Columns.AddRange(id, name, enabled);
}
开发者ID:swanestle,项目名称:iXY,代码行数:32,代码来源:ProductList.cs
示例13: createColumnDataGridView
public static void createColumnDataGridView(DataGridView dgvAgenda)
{
dgvAgenda.AutoGenerateColumns = false;
DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn();
col.DataPropertyName = "ag";
col.HeaderText = "object";
col.Width = 50;
col.Visible = false;
dgvAgenda.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.DataPropertyName = "hour";
col.HeaderText = "Heure";
col.Width = 50;
dgvAgenda.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.DataPropertyName = "Nom";
col.HeaderText = "Client";
col.Width = 140;
dgvAgenda.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.DataPropertyName = "animal";
col.HeaderText = "Animal";
col.Width = 140;
dgvAgenda.Columns.Add(col);
col = new DataGridViewTextBoxColumn();
col.DataPropertyName = "race";
col.HeaderText = "Race";
col.Width = 80;
dgvAgenda.Columns.Add(col);
}
开发者ID:NivekAlunya,项目名称:clinique,代码行数:30,代码来源:CommonBehaviourView.cs
示例14: InitTodoMarkersGridView
private void InitTodoMarkersGridView(IList<ToDoMarker> markers)
{
TodoMarkersGridView.AutoGenerateColumns = false;
TodoMarkersGridView.Columns.Clear();
TodoMarkersGridView.DataSource = new BindingList<ToDoMarker>(markers);
TodoMarkersGridView.AlternatingRowsDefaultCellStyle.BackColor = Color.Lavender;
TodoMarkersGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
TodoMarkersGridView.CellValueChanged += SelectedPriorityChanged;
TodoMarkersGridView.ColumnHeaderMouseClick += SortColumn;
var markerTextColumn = new DataGridViewTextBoxColumn
{
Name = "Text",
DataPropertyName = "Text",
HeaderText = RubberduckUI.TodoSettings_Text,
ReadOnly = true
};
var markerPriorityColumn = new DataGridViewComboBoxColumn
{
Name = "Priority",
DataSource = TodoLabels(),
AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill,
HeaderText = RubberduckUI.TodoSettings_Priority,
DataPropertyName = "PriorityLabel",
};
TodoMarkersGridView.Columns.AddRange(markerTextColumn, markerPriorityColumn);
}
开发者ID:ThunderFrame,项目名称:Rubberduck,代码行数:29,代码来源:TodoListSettingsUserControl.cs
示例15: InitGrid
private void InitGrid(bool isReadOnly)
{
var clId = new DataGridViewTextBoxColumn { HeaderText = "Id", DataPropertyName = "Id", Name = "Id" };
clId.Visible = false;
grd.Columns.Add(clId);
var clMedicineId = new DataGridViewTextBoxColumn { HeaderText = "Mã thuốc", DataPropertyName = "MedicineId", Name = "MedicineId" };
clMedicineId.Visible = false;
grd.Columns.Add(clMedicineId);
var clMedicineName = new DataGridViewTextBoxColumn { HeaderText = "Tên thuốc", DataPropertyName = "MedicineName", Name = "MedicineName" };
clMedicineName.ReadOnly = true;
grd.Columns.Add(clMedicineName);
var clInStock = new DataGridViewTextBoxColumn { HeaderText = "Số thuốc trong kho", DataPropertyName = "InStock", Name = "InStock" };
clInStock.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
clInStock.ReadOnly = true;
grd.Columns.Add(clInStock);
var clLastMonthUsage = new DataGridViewTextBoxColumn { HeaderText = "Số thuốc dùng tháng trước", DataPropertyName = "LastMonthUsage", Name = "LastMonthUsage" };
clLastMonthUsage.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
clLastMonthUsage.ReadOnly = true;
grd.Columns.Add(clLastMonthUsage);
var clCurrentMonthUsage = new DataGridViewTextBoxColumn { HeaderText = "Số thuốc tháng này đã dùng", DataPropertyName = "CurrentMonthUsage", Name = "CurrentMonthUsage" };
clCurrentMonthUsage.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
clCurrentMonthUsage.ReadOnly = true;
grd.Columns.Add(clCurrentMonthUsage);
var clRequired = new DataGridViewTextBoxColumn { HeaderText = "Số thuốc mong muốn", DataPropertyName = "Required", Name = "Required" };
clRequired.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
clRequired.ReadOnly = !isReadOnly;
grd.Columns.Add(clRequired);
}
开发者ID:kiemhieu,项目名称:medicine-website,代码行数:34,代码来源:frmMedicinePlanDetail.cs
示例16: NewSportsFestivalGUI
internal NewSportsFestivalGUI(NewSportsFestivalController controller)
{
InitializeComponent();
this.StyleManager = metroStyleManager;
DataGridViewCheckBoxColumn checkboxColumn = new DataGridViewCheckBoxColumn();
checkboxColumn.HeaderText = "";
checkboxColumn.Name = competitionGridColumn0Name;
checkboxColumn.Width = 50;
DataGridViewTextBoxColumn competitionIdColumn = new DataGridViewTextBoxColumn();
competitionIdColumn.HeaderText = "Wettkampf-ID";
competitionIdColumn.Name = competitionGridColumn1Name;
competitionIdColumn.Visible = false;
DataGridViewTextBoxColumn competitionNameColumn = new DataGridViewTextBoxColumn();
competitionNameColumn.HeaderText = "Wettkampf";
competitionNameColumn.Name = competitionGridColumn2Name;
competitionNameColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
competitionNameColumn.ReadOnly = true;
competitionGrid.Columns.Add(checkboxColumn);
competitionGrid.Columns.Add(competitionIdColumn);
competitionGrid.Columns.Add(competitionNameColumn);
}
开发者ID:julianhendricks,项目名称:BKTMProjektSportfest,代码行数:26,代码来源:NewSportsFestivalGUI.cs
示例17: GetColumns
private List<DataGridViewColumn> GetColumns()
{
List<DataGridViewColumn> columns;
DataGridViewTextBoxColumn column;
columns = new List<DataGridViewColumn>();
column = new DataGridViewTextBoxColumn();
column.Name = "id";
column.DataPropertyName = "Id";
column.Visible = false;
columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.Name = "categoryId";
column.DataPropertyName = "CategoryId";
column.Visible = false;
columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.Name = "name";
column.DataPropertyName = "Name";
column.HeaderText = "Name";
column.Width = 200;
columns.Add(column);
column = new DataGridViewTextBoxColumn();
column.Name = "categoryName";
column.DataPropertyName = "CategoryName";
column.HeaderText = "Category Name";
column.Width = 200;
columns.Add(column);
return columns;
}
开发者ID:cv1973,项目名称:MoneyFlow,代码行数:35,代码来源:PaymentTypeForm.cs
示例18: BuildTable
public override void BuildTable(DataGridView dgv, object[] items)
{
dgv.AllowUserToAddRows = false;
dgv.AllowUserToDeleteRows = false;
DataGridViewColumn col;
string[] col_names = { "Index", "Text" };
for (int i = 0; i < col_names.Length; i++)
{
col = new DataGridViewTextBoxColumn();
col.Name = col_names[i];
dgv.Columns.Add(col);
}
for (int i = 0; i < items.Length; i++)
{
MuDef.MUFile_ItemSetOptionText Item;
if (items[i] != null)
{
Item = (MuDef.MUFile_ItemSetOptionText)items[i];
dgv.Rows.Add(Item.Index, Item.Text);
}
}
EnumerateLines(dgv);
}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:28,代码来源:ItemSetOptionText.cs
示例19: LoadListaVariaveis
public void LoadListaVariaveis(List<MaquinaInequacoesServiceReference.Variavel> variaveis)
{
dataGridView3.AutoGenerateColumns = false;
dataGridView3.DataSource = variaveis;
DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();
chk.HeaderText = "X";
chk.Name = "chkVariaveis";
dataGridView3.Columns.Add(chk);
//dataGridView3.Columns.Add(CreateComboBoxOrdem());
DataGridViewColumn column = new DataGridViewTextBoxColumn();
column.DataPropertyName = "Nome";
column.Name = "Variavel";
dataGridView3.Columns.Add(column);
/*
DataGridViewComboBoxColumn cmb = new DataGridViewComboBoxColumn();
cmb.HeaderText = "Ordem";
cmb.Name = "cmbOrdem";
cmb.MaxDropDownItems = 100;
for (int i = 0; i < 100; i++)
{
cmb.Items.Add(i);
}
dataGridView3.Columns.Add(cmb);
foreach (DataGridViewRow row in dataGridView3.Rows)
{
row.Cells[chk.Name].Value = false;
//(row.Cells[cmb.Name] as DataGridViewComboBoxCell).Value = 0;
}
*/
}
开发者ID:jonimoreira,项目名称:TestTFS,代码行数:34,代码来源:SimulacaoValidacaoLimitesVisoes.cs
示例20: AddColumn
/// <summary>
///
/// </summary>
/// <param name="headerText"></param>
/// <param name="dataPropertyName"></param>
void AddColumn(string headerText, string dataPropertyName)
{
DataGridViewColumn c = new DataGridViewTextBoxColumn();
c.HeaderText = headerText;
c.DataPropertyName = dataPropertyName;
this.dataGridView1.Columns.Add(c);
}
开发者ID:hkiaipc,项目名称:hunb,代码行数:12,代码来源:frmMeasureDitchData.cs
注:本文中的System.Windows.Forms.DataGridViewTextBoxColumn类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论