本文整理汇总了C#中System.Windows.Forms.DataGridTextBoxColumn类的典型用法代码示例。如果您正苦于以下问题:C# DataGridTextBoxColumn类的具体用法?C# DataGridTextBoxColumn怎么用?C# DataGridTextBoxColumn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridTextBoxColumn类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridTextBoxColumn类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: setupColumns
private void setupColumns()
{
DataGridTextBoxColumn tCol;
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Name";
tCol.MappingName = "Name";
tCol.Width = 100;
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Codes";
tCol.MappingName = "Codes";
tCol.Width = 100;
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Rate";
tCol.MappingName = "Rate";
tCol.Width = 100;
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "PassThrus";
tCol.MappingName = "PassThrus";
tCol.Width = 100;
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
}
开发者ID:RookieOne,项目名称:RMS_Refactor,代码行数:32,代码来源:FloorGrid.cs
示例2: InitGrid
/// <summary>
/// 初始化表格控件
/// </summary>
private void InitGrid()
{
var dgts = new DataGridTableStyle { MappingName = prods.ProDelivery.TableName };
DataGridColumnStyle dgRowNo = new DataGridTextBoxColumn();
dgRowNo.Width = 40;
dgRowNo.MappingName = prods.ProDelivery.RowNoColumn.ColumnName;
dgRowNo.HeaderText = "序号";
dgts.GridColumnStyles.Add(dgRowNo);
//DataGridColumnStyle dgAutoID = new DataGridTextBoxColumn();
//dgAutoID.Width = 40;
//dgAutoID.MappingName = "AutoID";
//dgAutoID.HeaderText = "";
//dgts.GridColumnStyles.Add(dgAutoID);
DataGridColumnStyle dgccOrderNumber = new DataGridTextBoxColumn();
dgccOrderNumber.Width = 120;
dgccOrderNumber.MappingName = "cCode";
dgccOrderNumber.HeaderText = "单号";
dgts.GridColumnStyles.Add(dgccOrderNumber);
DataGridColumnStyle dgccCusName = new DataGridTextBoxColumn();
dgccCusName.Width = 70;
dgccCusName.MappingName = "cCusName";
dgccCusName.HeaderText = "客户";
dgts.GridColumnStyles.Add(dgccCusName);
DataGridColumnStyle dgccMaker = new DataGridTextBoxColumn();
dgccMaker.Width = 70;
dgccMaker.MappingName = "cMaker";
dgccMaker.HeaderText = "制单人";
dgts.GridColumnStyles.Add(dgccMaker);
DataGridColumnStyle dgccDepName = new DataGridTextBoxColumn();
dgccDepName.Width = 70;
dgccDepName.MappingName = "cDepName";
dgccDepName.HeaderText = "部门";
dgts.GridColumnStyles.Add(dgccDepName);
DataGridColumnStyle dgcMemo = new DataGridTextBoxColumn();
dgcMemo.Width = 70;
dgcMemo.MappingName = "cMemo";
dgcMemo.HeaderText = "备注";
dgts.GridColumnStyles.Add(dgcMemo);
DataGridColumnStyle dgccVerifyState = new DataGridTextBoxColumn();
dgccVerifyState.Width = 70;
dgccVerifyState.MappingName = "cVerifyState";
dgccVerifyState.HeaderText = "状态";
dgts.GridColumnStyles.Add(dgccVerifyState);
dGridMain.TableStyles.Clear();
dGridMain.TableStyles.Add(dgts);
dGridMain.DataSource = prods.ProDelivery;
}
开发者ID:JARANTeam,项目名称:HPDA,代码行数:63,代码来源:ProDeliveryDownload.cs
示例3: InitValues
private void InitValues()
{
// Initialize the DataGrid columns
dgtbName = new DataGridTextBoxColumn();
dgtbValue = new DataGridTextBoxColumn();
this.dgTableStyle.GridColumnStyles.AddRange(new DataGridColumnStyle[] {
this.dgtbName,
this.dgtbValue});
//
// dgtbFE
//
dgtbName.HeaderText = "Parameter Name";
dgtbName.MappingName = "Name";
dgtbName.Width = 75;
//
// dgtbValue
//
this.dgtbValue.HeaderText = "Value";
this.dgtbValue.MappingName = "Value";
this.dgtbValue.Width = 75;
// string[] parms = _Draw.GetReportParameters(true);
// if (parms != null)
// dgtbFV.CB.Items.AddRange(parms);
// Initialize the DataGrid
this.dgParms.DataSource = _dsv.QueryParameters;
DataGridTableStyle ts = dgParms.TableStyles[0];
ts.GridColumnStyles[0].Width = 140;
ts.GridColumnStyles[1].Width = 140;
}
开发者ID:mnisl,项目名称:OD,代码行数:32,代码来源:QueryParametersCtl.cs
示例4: TestAdd
public void TestAdd ()
{
DataGridTableStyle ts = new DataGridTableStyle ();
GridColumnStylesCollection sc = ts.GridColumnStyles;
sc.CollectionChanged += new CollectionChangeEventHandler (OnCollectionEventHandler);
// Add single
ResetEventData ();
DataGridTextBoxColumn col1 = new DataGridTextBoxColumn ();
col1.MappingName = "Column1";
sc.Add (col1);
Assert.AreEqual (true, eventhandled);
Assert.AreEqual (col1, Element);
Assert.AreEqual (CollectionChangeAction.Add, Action);
// Add multiple
ResetEventData ();
DataGridTextBoxColumn elem1 = new DataGridTextBoxColumn ();
DataGridTextBoxColumn elem2 = new DataGridTextBoxColumn ();
sc.AddRange (new DataGridTextBoxColumn [] {elem1, elem2});
Assert.AreEqual (true, eventhandled, "A1");
Assert.AreEqual (CollectionChangeAction.Add, Action, "A2");
Assert.AreEqual (elem2, Element, "A3");
}
开发者ID:nlhepler,项目名称:mono,代码行数:25,代码来源:GridColumnStylesCollectionTest.cs
示例5: frmStock_Items
public static DataGridTableStyle frmStock_Items()
{
DataGridTableStyle dtStyle = new DataGridTableStyle();
dtStyle.MappingName = "table";
DataGridTextBoxColumn id = new DataGridTextBoxColumn();
id.MappingName = "id";
id.HeaderText = "ID";
id.Width = 30;
dtStyle.GridColumnStyles.Add(id);
DataGridTextBoxColumn lotno = new DataGridTextBoxColumn();
lotno.MappingName = "lot_no";
lotno.HeaderText = "Lot#";
lotno.Width = 80;
dtStyle.GridColumnStyles.Add(lotno);
DataGridTextBoxColumn qty = new DataGridTextBoxColumn();
qty.MappingName = "qty";
qty.HeaderText = "Qty";
qty.Width = 96;
dtStyle.GridColumnStyles.Add(qty);
return dtStyle;
}
开发者ID:kingpauloaquino,项目名称:CERP-Portable,代码行数:25,代码来源:DataGrid_Style.cs
示例6: CreateDataGridTableStyle
public static DataGridTableStyle CreateDataGridTableStyle(string tableMappingName,string[] dbColName,
string[] dgShowName,int[] boolColumnIndex)
{
ArgumentChecker.CheckNotNull(dbColName);
ArgumentChecker.CheckNotNull(dgShowName);
if(dbColName.Length !=dgShowName.Length )
throw new ArgumentException("dbColName.length !=dgShowName.Length");
DataGridTableStyle dgts=new DataGridTableStyle();
dgts.MappingName=tableMappingName;
DataGridColumnStyle dgcs=null;
for(int i=0;i<dbColName.Length;i++)
{
if(InArray(boolColumnIndex,i))
dgcs=new DataGridBoolColumn();
else
dgcs=new DataGridTextBoxColumn();
dgcs.MappingName=dbColName[i];
dgcs.HeaderText=dgShowName[i];
dgts.GridColumnStyles.Add(dgcs);
}
return dgts;
}
开发者ID:hkiaipc,项目名称:lx,代码行数:25,代码来源:Misc.cs
示例7: getTableStyle
public DataGridTableStyle getTableStyle()
{
DataGridTableStyle style = new DataGridTableStyle();
style.MappingName = "ArrayList";
DataGridTextBoxColumn column = new DataGridTextBoxColumn();
column.MappingName = "Name";
column.HeaderText = "Name";
column.Format = "f4";
column.Width = 150;
style.GridColumnStyles.Add(column);
column = new DataGridTextBoxColumn();
column.MappingName = "Status";
column.HeaderText = "Completed";
column.Format = "f4";
column.Width = 85;
style.GridColumnStyles.Add(column);
column = new DataGridTextBoxColumn();
column.MappingName = "SupportID";
column.HeaderText = "SupportID";
column.Format = "d";
column.Width = 25;
style.GridColumnStyles.Add(column);
column = new DataGridTextBoxColumn();
column.MappingName = "StatusID";
column.HeaderText = "StatusID";
column.Format = "d";
column.Width = 25;
style.GridColumnStyles.Add(column);
return style;
}
开发者ID:testdoron,项目名称:ProScan,代码行数:35,代码来源:TestForm.cs
示例8: setupColumns
private void setupColumns()
{
DataGridTextBoxColumn tCol;
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Name";
tCol.MappingName = "Name";
tCol.Width = Convert.ToInt16(rateDataGrid.Width * .35);
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Codes";
tCol.MappingName = "Codes";
tCol.Width = Convert.ToInt16(rateDataGrid.Width * .35);
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
tCol = new DataGridTextBoxColumn();
tCol.HeaderText = "Rate";
tCol.MappingName = "Rate";
tCol.Format = "C0";
tCol.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
tCol.Width = Convert.ToInt16(rateDataGrid.Width * .3);
this.rateDataGrid.TableStyles[0].GridColumnStyles.Add(tCol);
}
开发者ID:RookieOne,项目名称:RMS_Refactor,代码行数:27,代码来源:PerDiemGrid.cs
示例9: generatedatagrid
public void generatedatagrid()
{
DataGridTableStyle tableStyle = new DataGridTableStyle();
tableStyle.MappingName = arr1.GetType().Name;
DataGridTextBoxColumn tbcName = new DataGridTextBoxColumn();
tbcName.Width = dataGrid1.Width * 50 / 100;
tbcName.MappingName = "EPC";
tbcName.HeaderText = "EPC";
tableStyle.GridColumnStyles.Add(tbcName);
tbcName = new DataGridTextBoxColumn();
tbcName.Width = dataGrid1.Width * 20 / 100;
tbcName.MappingName = "Timestamp";
tbcName.HeaderText = "Timestamp";
tableStyle.GridColumnStyles.Add(tbcName);
tbcName = new DataGridTextBoxColumn();
tbcName.Width = dataGrid1.Width * 15 / 100;
tbcName.MappingName = "ReadCount";
tbcName.HeaderText = "ReadCount";
tableStyle.GridColumnStyles.Add(tbcName);
tbcName = new DataGridTextBoxColumn();
tbcName.Width = dataGrid1.Width * 12 / 100;
tbcName.MappingName = "Rssi";
tbcName.HeaderText = "Rssi";
tableStyle.GridColumnStyles.Add(tbcName);
dataGrid1.TableStyles.Clear();
dataGrid1.TableStyles.Add(tableStyle);
}
开发者ID:colombmo,项目名称:itsi-gamification,代码行数:32,代码来源:Form1.cs
示例10: InitValues
private void InitValues()
{
// Initialize the DataGrid columns
dgtbExpr = new DataGridTextBoxColumn();
dgtbDir = new DataGridBoolColumn();
this.dgTableStyle.GridColumnStyles.AddRange(new DataGridColumnStyle[] {
this.dgtbExpr,
this.dgtbDir});
//
// dgtbExpr
//
dgtbExpr.HeaderText = "Sort Expression";
dgtbExpr.MappingName = "SortExpression";
dgtbExpr.Width = 75;
// Get the parent's dataset name
// string dataSetName = _Draw.GetDataSetNameValue(_SortingParent);
//
// string[] fields = _Draw.GetFields(dataSetName, true);
// if (fields != null)
// dgtbExpr.CB.Items.AddRange(fields);
//
// dgtbDir
//
dgtbDir.HeaderText = "Sort Ascending";
dgtbDir.MappingName = "Direction";
dgtbDir.Width = 70;
dgtbDir.AllowNull = false;
// Initialize the DataTable
_DataTable = new DataTable();
_DataTable.Columns.Add(new DataColumn("SortExpression", typeof(string)));
_DataTable.Columns.Add(new DataColumn("Direction", typeof(bool)));
object[] rowValues = new object[2];
XmlNode sorts = _Draw.GetNamedChildNode(_SortingParent, "Sorting");
if (sorts != null)
foreach (XmlNode sNode in sorts.ChildNodes)
{
if (sNode.NodeType != XmlNodeType.Element ||
sNode.Name != "SortBy")
continue;
rowValues[0] = _Draw.GetElementValue(sNode, "SortExpression", "");
if (_Draw.GetElementValue(sNode, "Direction", "Ascending") == "Ascending")
rowValues[1] = true;
else
rowValues[1] = false;
_DataTable.Rows.Add(rowValues);
}
this.dgSorting.DataSource = _DataTable;
DataGridTableStyle ts = dgSorting.TableStyles[0];
ts.PreferredRowHeight = 14;
ts.GridColumnStyles[0].Width = 240;
ts.GridColumnStyles[1].Width = 90;
}
开发者ID:romeroyonatan,项目名称:opendental,代码行数:59,代码来源:SortingCtl.cs
示例11: AddColumn
public static void AddColumn(this DataGrid dataGrid, string caption, string columnName, int width)
{
DataGridTextBoxColumn ColumnStyle = new DataGridTextBoxColumn();
ColumnStyle.HeaderText = caption;
ColumnStyle.MappingName = columnName;
ColumnStyle.Width = width;
dataGrid.TableStyles["Mobile"].GridColumnStyles.Add(ColumnStyle);
}
开发者ID:AramisIT,项目名称:FMCG,代码行数:8,代码来源:DataTableEx.cs
示例12: TestAlignmentChangedEvent
public void TestAlignmentChangedEvent ()
{
DataGridTextBoxColumn col = new DataGridTextBoxColumn ();
eventhandled = false;
col.AlignmentChanged += new EventHandler (OnEventHandler);
col.Alignment = HorizontalAlignment.Center;
Assert.AreEqual (true, eventhandled, "A1");
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:DataGridTextBoxColumnTest.cs
示例13: TestMappingNameChangedEvent
public void TestMappingNameChangedEvent ()
{
DataGridTextBoxColumn col = new DataGridTextBoxColumn ();
eventhandled = false;
col.MappingNameChanged += new EventHandler (OnEventHandler);
col.MappingName = "name1";
Assert.AreEqual (true, eventhandled, "A1");
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:DataGridTextBoxColumnTest.cs
示例14: SopClassesUserControl
/// <summary>
/// Constructor
/// </summary>
public SopClassesUserControl()
{
InitializeComponent();
_theDefinitionFileTextColumn = new DataGridTextBoxColumn();
Initialize();
//UpdateDataGrid();
}
开发者ID:ewcasas,项目名称:DVTK,代码行数:12,代码来源:SOPClassUserControl.cs
示例15: FormSTO_Load
private void FormSTO_Load(object sender, EventArgs e)
{
buttonConvert.Hide();
try
{
SqlDataReader dr;
string sqls = "SELECT COUNT(TagID),COUNT([TagDuplicate]),COUNT(*) FROM MasterKanban";
SqlCommand cmd = new SqlCommand(sqls, Connect.con2);
if (Connect.con2.State == ConnectionState.Closed) { Connect.con2.Open(); }
dr = cmd.ExecuteReader();
if (dr.Read())
{
labelUniq.Text = "Uniq Item : " + dr[0].ToString();
labelDuplicate.Text = "Duplicate Item : " + dr[1].ToString();
labelTotal.Text = "Total Scan Item : " + dr[2].ToString();
}
dr.Close();
cmd.Dispose();
if (Connect.con2.State == ConnectionState.Open) { Connect.con2.Close(); }
DataSet ds = new DataSet();
string strSQL = " select distinct(TagDuplicate), count(TagDuplicate) as Jumlah from MasterKanban where TagDuplicate is not null group by TagDuplicate";
SqlDataAdapter da = new SqlDataAdapter(strSQL, Connect.con2);
da.Fill(ds, "LogDuplicat");
dataGridListDuplicat.DataSource = ds.Tables[0];
DataGridTableStyle ts = new DataGridTableStyle();
dataGridListDuplicat.TableStyles.Clear();
ts.MappingName = "LogDuplicat";
DataGridTextBoxColumn col1 = new DataGridTextBoxColumn();
col1.HeaderText = "TagDuplicate";
col1.MappingName = "TagDuplicate";
col1.Width = 190;
ts.GridColumnStyles.Add(col1);
DataGridTextBoxColumn col2 = new DataGridTextBoxColumn();
col2.HeaderText = "Jumlah";
col2.MappingName = "Jumlah";
col2.Width = 40;
ts.GridColumnStyles.Add(col2);
dataGridListDuplicat.TableStyles.Add(ts);
dataGridListDuplicat.Refresh();
ds.Tables.Clear();
da.Dispose();
ds.Dispose();
dataGridListDuplicat.Enabled = true;
}
catch (SqlException ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
this.Close();
}
}
开发者ID:exucupers,项目名称:Akebonbon-PDT-RFID-MC55,代码行数:57,代码来源:FormSTO.cs
示例16: InitGrid
/// <summary>
/// 初始化表格控件
/// </summary>
private void InitGrid()
{
var dgts = new DataGridTableStyle { MappingName = rds.RmProduce.TableName};
DataGridColumnStyle dgAutoID = new DataGridTextBoxColumn();
dgAutoID.Width = 40;
dgAutoID.MappingName = "RowNo";
dgAutoID.HeaderText = "序号";
dgts.GridColumnStyles.Add(dgAutoID);
DataGridColumnStyle dgccCode = new DataGridTextBoxColumn();
dgccCode.Width = 120;
dgccCode.MappingName = "cCode";
dgccCode.HeaderText = "班次单号";
dgts.GridColumnStyles.Add(dgccCode);
DataGridColumnStyle dgccInvCode = new DataGridTextBoxColumn();
dgccInvCode.Width = 60;
dgccInvCode.MappingName = "cInvCode";
dgccInvCode.HeaderText = "原料编码";
dgts.GridColumnStyles.Add(dgccInvCode);
DataGridColumnStyle dgccInvName = new DataGridTextBoxColumn();
dgccInvName.Width = 80;
dgccInvName.MappingName = "cInvName";
dgccInvName.HeaderText = "原料名称";
dgts.GridColumnStyles.Add(dgccInvName);
//DataGridColumnStyle dgccUnit = new DataGridTextBoxColumn();
//dgccUnit.Width = 60;
//dgccUnit.MappingName = "cUnit";
//dgccUnit.HeaderText = "单位";
//dgts.GridColumnStyles.Add(dgccUnit);
DataGridColumnStyle dgciQuantity = new DataGridTextBoxColumn();
dgciQuantity.Width = 70;
dgciQuantity.MappingName = "iQuantity";
dgciQuantity.HeaderText = "数量";
dgts.GridColumnStyles.Add(dgciQuantity);
DataGridColumnStyle dgcMemo = new DataGridTextBoxColumn();
dgcMemo.Width = 70;
dgcMemo.MappingName = "cMemo";
dgcMemo.HeaderText = "备注";
dgts.GridColumnStyles.Add(dgcMemo);
dGridMain.TableStyles.Clear();
dGridMain.TableStyles.Add(dgts);
dGridMain.DataSource = rds.RmProduce;
}
开发者ID:JARANTeam,项目名称:HPDA,代码行数:59,代码来源:RmProduceDownload.cs
示例17: InitGrid
/// <summary>
/// 初始化表格控件
/// </summary>
private void InitGrid()
{
var dgts = new DataGridTableStyle { MappingName = prods.StockDetail.TableName };
DataGridColumnStyle dgRowNo = new DataGridTextBoxColumn();
dgRowNo.Width = 40;
dgRowNo.MappingName = "RowNo";
dgRowNo.HeaderText = "序号";
dgts.GridColumnStyles.Add(dgRowNo);
DataGridColumnStyle dgAutoID = new DataGridTextBoxColumn();
dgAutoID.Width = 90;
dgAutoID.MappingName = "FBatchNo";
dgAutoID.HeaderText = "批号";
dgts.GridColumnStyles.Add(dgAutoID);
DataGridColumnStyle dgccOrderNumber = new DataGridTextBoxColumn();
dgccOrderNumber.Width = 90;
dgccOrderNumber.MappingName = "FQty";
dgccOrderNumber.HeaderText = "数量";
dgts.GridColumnStyles.Add(dgccOrderNumber);
DataGridColumnStyle dgccInvCode = new DataGridTextBoxColumn();
dgccInvCode.Width = 60;
dgccInvCode.MappingName = "FStockName";
dgccInvCode.HeaderText = "仓库";
dgts.GridColumnStyles.Add(dgccInvCode);
DataGridColumnStyle dgccInvName = new DataGridTextBoxColumn();
dgccInvName.Width = 80;
dgccInvName.MappingName = "FStockPlaceNumber";
dgccInvName.HeaderText = "仓位编码";
dgts.GridColumnStyles.Add(dgccInvName);
//DataGridColumnStyle dgccUnit = new DataGridTextBoxColumn();
//dgccUnit.Width = 60;
//dgccUnit.MappingName = "cUnit";
//dgccUnit.HeaderText = "单位";
//dgts.GridColumnStyles.Add(dgccUnit);
DataGridColumnStyle dgciQuantity = new DataGridTextBoxColumn();
dgciQuantity.Width = 70;
dgciQuantity.MappingName = "FStockPlaceName";
dgciQuantity.HeaderText = "仓位";
dgts.GridColumnStyles.Add(dgciQuantity);
dGridMain.TableStyles.Clear();
dGridMain.TableStyles.Add(dgts);
dGridMain.DataSource = prods.StockDetail;
}
开发者ID:JARANTeam,项目名称:HPDA,代码行数:59,代码来源:FrmScanDetail.cs
示例18: newGridColumn
public DataGridTextBoxColumn newGridColumn(string header, string mappingName, bool visible)
{
DataGridTextBoxColumn tCol = new DataGridTextBoxColumn();
tCol.HeaderText = header;
tCol.TextBox.Visible = visible;
tCol.MappingName = mappingName;
return tCol;
}
开发者ID:RookieOne,项目名称:RMS_Refactor,代码行数:10,代码来源:Analysis_ParentGrid.cs
示例19: InitGrid
/// <summary>
/// 初始化表格控件
/// </summary>
private void InitGrid()
{
var dgts = new DataGridTableStyle { MappingName = rds.RmPo.TableName };
DataGridColumnStyle dgAutoID = new DataGridTextBoxColumn();
dgAutoID.Width = 40;
dgAutoID.MappingName = "RowNo";
dgAutoID.HeaderText = "序号";
dgts.GridColumnStyles.Add(dgAutoID);
DataGridColumnStyle dgccOrderNumber = new DataGridTextBoxColumn();
dgccOrderNumber.Width = 120;
dgccOrderNumber.MappingName = "cOrderNumber";
dgccOrderNumber.HeaderText = "采购单号";
dgts.GridColumnStyles.Add(dgccOrderNumber);
DataGridColumnStyle dgccVendor = new DataGridTextBoxColumn();
dgccVendor.Width = 120;
dgccVendor.MappingName = "cVendor";
dgccVendor.HeaderText = "供应商";
dgts.GridColumnStyles.Add(dgccVendor);
DataGridColumnStyle dgcMemo = new DataGridTextBoxColumn();
dgcMemo.Width = 70;
dgcMemo.MappingName = "cMemo";
dgcMemo.HeaderText = "备注";
dgts.GridColumnStyles.Add(dgcMemo);
DataGridColumnStyle dgcdLoadDate = new DataGridTextBoxColumn();
dgcdLoadDate.Width = 100;
dgcdLoadDate.MappingName = "dLoadDate";
dgcdLoadDate.HeaderText = "下载时间";
dgts.GridColumnStyles.Add(dgcdLoadDate);
//dgccUnit.Width = 60;
//dgccUnit.MappingName = "cUnit";
//dgccUnit.HeaderText = "单位";
//dgts.GridColumnStyles.Add(dgccUnit);
DataGridColumnStyle dgciQuantity = new DataGridTextBoxColumn();
dgciQuantity.Width = 70;
dgciQuantity.MappingName = "iQuantity";
dgciQuantity.HeaderText = "总数";
dgts.GridColumnStyles.Add(dgciQuantity);
dGridMain.TableStyles.Clear();
dGridMain.TableStyles.Add(dgts);
dGridMain.DataSource = rds.RmPo;
}
开发者ID:JARANTeam,项目名称:HPDA,代码行数:57,代码来源:RmPoSelect.cs
示例20: InitGrid
/// <summary>
/// 初始化表格控件
/// </summary>
private void InitGrid()
{
var dgts = new DataGridTableStyle { MappingName = rds.RmProduceDetail.TableName };
DataGridColumnStyle dgAutoID = new DataGridTextBoxColumn();
dgAutoID.Width = 40;
dgAutoID.MappingName = "RowNo";
dgAutoID.HeaderText = "序号";
dgts.GridColumnStyles.Add(dgAutoID);
DataGridColumnStyle dgccCode = new DataGridTextBoxColumn();
dgccCode.Width = 120;
dgccCode.MappingName = "cLotNo";
dgccCode.HeaderText = "批号";
dgts.GridColumnStyles.Add(dgccCode);
DataGridColumnStyle dgccInvCode = new DataGridTextBoxColumn();
dgccInvCode.Width = 60;
dgccInvCode.MappingName = "cInvCode";
dgccInvCode.HeaderText = "产品编码";
dgts.GridColumnStyles.Add(dgccInvCode);
DataGridColumnStyle dgccInvName = new DataGridTextBoxColumn();
dgccInvName.Width = 80;
dgccInvName.MappingName = "cInvName";
dgccInvName.HeaderText = "产品名称";
dgts.GridColumnStyles.Add(dgccInvName);
//DataGridColumnStyle dgccUnit = new DataGridTextBoxColumn();
//dgccUnit.Width = 60;
//dgccUnit.MappingName = "cUnit";
//dgccUnit.HeaderText = "单位";
//dgts.GridColumnStyles.Add(dgccUnit);
DataGridColumnStyle dgciQuantity = new DataGridTextBoxColumn();
dgciQuantity.Width = 70;
dgciQuantity.MappingName = "iQuantity";
dgciQuantity.HeaderText = "数量";
dgts.GridColumnStyles.Add(dgciQuantity);
DataGridColumnStyle dgcCode = new DataGridTextBoxColumn();
dgcCode.Width = 60;
dgcCode.MappingName = "FSPNumber";
dgcCode.HeaderText = "库位";
dgts.GridColumnStyles.Add(dgcCode);
dGridMain.TableStyles.Clear();
dGridMain.TableStyles.Add(dgts);
dGridMain.DataSource = rds.RmProduceDetail;
}
开发者ID:JARANTeam,项目名称:HPDA,代码行数:57,代码来源:RmProduce.cs
注:本文中的System.Windows.Forms.DataGridTextBoxColumn类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论