开发者

Changing the Header value in Grid View

开发者 https://www.devze.com 2023-01-05 05:29 出处:网络
Using VS2005 I am using Gridview in my web page, when i load the web page, the table header also displaying in the GridView. So i want to give my different he开发者_Python百科ader name in datagridvie

Using VS2005

I am using Gridview in my web page, when i load the web page, the table header also displaying in the GridView. So i want to give my different he开发者_Python百科ader name in datagridview.

So how to change the setting in datagridview.


set HeaderText="FirstName" property of you column as below

 <asp:BoundField HeaderText="FirstName" DataField="FirstName" SortExpression="FirstName"
                                            ReadOnly="true" HeaderStyle-Width="120px" ItemStyle-Width="120px" />


you want to add

<HeaderTemplate> Name </HeaderTemplate>
0

精彩评论

暂无评论...
验证码 换一张
取 消