如何对齐我的数据网格的列 [英] how to align the column of my datagrid

查看:58
本文介绍了如何对齐我的数据网格的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我在如何对齐我的数据网格中的列时遇到问题.

我希望你能帮助我.感谢

hello guys.

i have problem how to align my column in my datagrid.

i hope you can help me. thanks

推荐答案

尝试此

try this

<asp:TemplateField HeaderText="Third">
                  <ItemTemplate>
                     <asp:TextBox ID="TextBox2" Text=''<%#Eval("id") %>'' runat="server"></asp:TextBox>
                  </ItemTemplate>
                  <ItemStyle HorizontalAlign ="Right" />
              </asp:TemplateField>

 //with this you can align your datagrid
<ItemStyle HorizontalAlign ="Right" />


在设计器窗口中选择DataGridView并将属性"RowStyle|HorizontalAlign"设置为右",或更改HTML代码并将"align=right"添加到< ; td>标签.
Either select your DataGridView in the designer window and set the property "RowStyle|HorizontalAlign" to "Right" or change the HTML code and add "align=right" to the <td> tags.


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

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