dataGridView 自定义控件问题 自定义控件中包含dataGridView控件,要封装什么方法实现dataGridView 中的列名的改变,导出dataGridView中的内容列名也跟着改 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string id=txtId.Text.Trim(); string name=txtName.Text.Trim(); DataTable dtSql = new DataTable("tinfor"); dtSql.Columns.Add(new DataColumn(id, typeof(string))); dtSql.Columns.Add(new DataColumn(name, typeof(string))); dsSql.Tables.Add(dtSql); daSql.Fill(dsSql, "tinfor"); dgvInfor.DataSource = dsSql.Tables["tinfor"]; //txtId txtName是TextBox //dgvInfor是datagridview winform打包时 插件怎么同时安装 C#锁事件的问题? Silverlight 2 SDK Beta 1 是不是只能用于Visual Studio 2008 ? winForm 中 dataGridView 中数据显示(菜鸟求助) C#中关于字符串合并的问题 求一简单算法,从A到ZZ... 请教各位 在asp.net中,DataGridview 可不可以实现隔行颜色的变化? 关于文件传输问题,有兴趣的朋友请进来 如何忽略大小写? datagridview一些些问题 急急急!!!socket通讯问题!
string name=txtName.Text.Trim();
DataTable dtSql = new DataTable("tinfor");
dtSql.Columns.Add(new DataColumn(id, typeof(string)));
dtSql.Columns.Add(new DataColumn(name, typeof(string)));
dsSql.Tables.Add(dtSql);
daSql.Fill(dsSql, "tinfor");
dgvInfor.DataSource = dsSql.Tables["tinfor"];
//txtId txtName是TextBox
//dgvInfor是datagridview