如何像这样设置GridView数据 [英] How to Set GridView data like this

查看:62
本文介绍了如何像这样设置GridView数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

得分
1. 1
2. 0
3. 1
4. 2
我想要以不同类型显示数据的内容吗?
如何?
请!

Score
1.1
2.0
3.1
4.2
I want the content of the data displyed in different type?
How to ?
Please!

推荐答案

Numth   Data
1     200.005
2     100.001


我想通过C#在dataGridView中设置这些数据
如何?
您清除吗?


I want set these data in dataGridView by C#
How to ?
Do you clear?


在客户端,

In the client side,

<asp:gridview id="grd" runat="server" emptydatatext="No Records" autogeneratecolumns="false">
<columns>
<asp:templatefield headertext="Num">
<itemtemplate><%#Eval("Numth")%></itemtemplate>


<asp:templatefield headertext="Data">
<itemtemplate><%#Eval("Data")%></itemtemplate>

</columns>



在服务器端,



In server side,

grd.Datasource=ds;//ds is the dataset you have to bind
grd.DataBind();


这篇关于如何像这样设置GridView数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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