在代码里该咋写呢?using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using DAL; namespace frmEmpInfo { public partial class ManSellGoods : Form { public ManSellGoods() { InitializeComponent(); } private void ManSellGoods_load_CellContentClick(object sender, DataGridViewCellEventArgs e) { } private void ManSellGoods_Load(object sender, EventArgs e) { addJhGoods showall = new addJhGoods(); this.ManSellGoods_load.DataSource = showall.FindGrid();
2、修改Datagridview列的HeaderText属性
3、绑定DataTable之前,修改DataTable的列名称
4、不采用绑定,直接定义列,然后循环DataTable进行填充......反正办法多的是,心细一点就能体会到
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DAL;
namespace frmEmpInfo
{
public partial class ManSellGoods : Form
{
public ManSellGoods()
{
InitializeComponent();
}
private void ManSellGoods_load_CellContentClick(object sender, DataGridViewCellEventArgs e)
{ } private void ManSellGoods_Load(object sender, EventArgs e)
{
addJhGoods showall = new addJhGoods();
this.ManSellGoods_load.DataSource = showall.FindGrid();
}
}
}
真心感谢额...这个问题今天问了好几遍了....
this.ManSellGoods_load.Columns["SuperMarketID"].HeaderText="XXXX";
以此类推
this.ManSellGoods_load.Columns["SuperMarketID"].HeaderText="XXXX";
以此类推
还不明白就+Q 360887674