绑定网格视图和标题文本 [英] bind grid view and header text

查看:79
本文介绍了绑定网格视图和标题文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库表,其中包含:
用户名,父亲姓名,user_nic,user_email
我有一个网格视图.我希望该网格视图获取具有Yahoo电子邮件ID的那些用户的信息.我也想更改gridview的标题文本.请告诉我怎么可能.
在此先感谢

i have a database table it contains:
username,fathername,user_nic,user_email
i have a grid view. i want that grid view takes information of those user who have yahoo email id. and i want to change the header text of gridview also. please tell me how is it possible.
thanks in advance

推荐答案

更改Gridview的标题文本

选项1:

在SQl查询中,您将使用sql列的别名.

例如:
To change the Header Text of Gridview

Option 1 :

In the SQl Query, you will use the alias names for sql Columns

Ex:
Select Email_ID as 'Email ID' from tablename



选项2:

Gridview_prerender 事件中更改HeaderText



Option 2:

Change the HeaderText in Gridview_prerender Event




1)仅向用户显示yahoo ID ...?
为此,您可以通过这种方式编写Sql查询

Hi,

1) To Show user Only with yahoo id...?
for that you can Write Sql Query in that way

Select * from Table where email_id like '%yahoo.com%'



2)要更改网格视图标题文本....

http://forums.asp.net/t/996470.aspx/1 [ ]



2)To change grid View Header Text....

http://forums.asp.net/t/996470.aspx/1[]


这篇关于绑定网格视图和标题文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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