如何使用csharp更改列名并更新到数据网格视图 [英] how to change the column name and update in to the data grid view using csharp
问题描述
数据库如下使用数据网格视图;
S no int
员工代码varchar
员工name varchar
mobile varchar
活跃字符(1)
此表中的
有100条记录。表名时间表。
设计如下;
日期员工姓名员工姓名员工姓名员工姓名员工姓名。
而不是员工姓名我从数据库表中获取员工姓名并显示在数据网格视图中。
i希望输出为
日期VRV RK Ck Mk PL GS CMK
以上名称VRV RK Ck Mk PL GS CMK应该从数据库中检索,表名是时间表。
来自我希望获得的时间表员工姓名并显示在数据网格视图栏中。
请发送密码。
Database as follows using data grid view ;
S no int
Staff code varchar
staff name varchar
mobile varchar
Active char(1)
in this table 100 of records are there.table name schedule.
Design as follows;
Day Period staff name staff name staff name staff name staff name.
instead of staff name i get the staff name from the data base table and display in to the data grid view.
i want the output as
Day Period VRV RK Ck Mk PL GS CMK
The above name VRV RK Ck Mk PL GS CMK should be retrieve from the data base, table name is schedule.
from the schedule table i want to get the staff name and display in to the data grid view column.
please send the code.
推荐答案
您可以编写重命名列的SQL,或编写自己的网格视图模板,以任意方式标记标题。
You can write SQL that renames the columns, or write your own grid view template that labels the headers any way you wish.
这篇关于如何使用csharp更改列名并更新到数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!