在datagridview中为特定列添加边框 [英] Adding border to specific colums in datagridview

查看:225
本文介绍了在datagridview中为特定列添加边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好;


创建一个Web应用程序,单击该按钮即可从Web服务中获取数据. Gridview代码如下

Hello all;


Creating a web application, in which data is fetched from web services on a button click. Gridview code is as follows

<asp:GridView ID="GridView1" runat="server" GridLines = "None"

            onrowdatabound="GridView1_RowDataBound" >
       <Columns>
    <asp:TemplateField>  
    <ItemTemplate >  
    <input id="radiobtn" name="radiobtn" type="radio"  runat="server" 

     önclick="CheckRadio(this.id);" />  
    </ItemTemplate>
    </asp:TemplateField>
         </Columns>
         </asp:GridView>




其他2列是:




Other 2 columns are:

CustomerID
CustomerName



所有这些功能都可以正常工作...但是现在我的团队负责人希望我在2列上添加框形边框.


谁能帮助我完成此任务.



This all functionality is working fine...but now my team leader wants me to add a box border on 2colums.


Can any one please help me with this task.

推荐答案

您可以通过CSS样式来完成此任务.创建边框的样式,然后通过将ItemStyle设置为特定的CSS,将其附加到列上.
You can do this via CSS styles. Create styles for borders and then attach them to the columns by setting the ItemStyle to the particular CSS.


任何人都可以通过css脚本或C#代码来帮助我完成此任务..

谢谢!!!
般若(Prajwal)
Can any one help me with the css script or C# code to do this task..

Thank You !!!
Prajwal


这篇关于在datagridview中为特定列添加边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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