如何在GridView中合并两列 [英] how to merge two column in gridview

查看:88
本文介绍了如何在GridView中合并两列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有gridview,它是动态填充的..其中有两列firstName和lastName.我必须合并这两列并显示为名称..请注意,所有数据都来自数据库. 预先谢谢您.

i have gridview which is filled dynamically..in which two column firstName and lastName is there.i have to merge this two column and display as name..note that all data is come from database..
thank you in advance

推荐答案

您不需要合并datagridview列.您可以使用查询来实现:
You don''t need to merge datagridview columns. You can achieve that using query:
SELECT firstName + ' ' + lastName AS [Customer]
FROM YourTable


这篇关于如何在GridView中合并两列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆