在网格视图中对齐控件 [英] align control in grid view

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

问题描述

我有一个网格视图
在此网格视图中是一个templatefield
在此列中有2个标签
我想要标签右对齐
和标签向左对齐

i have a grid view
in this grid view is a templatefield
in this columns is 2 label
i want a label align right
and a label align left
how way a can alignment control in grid view?

推荐答案

您可以将每个控件放在div中并对齐div.您也可以使用表格.
You can put each in a div and align the div. You could also use a table.


您好,
您可以在templatefield的项目模板中使用html表来格式化内容.
--AK
Hi,
You can use html table inside the item template of templatefield to format your contents .
--AK


<table width="100%">
<tr>
<td align="left"><asp:Label ID="lbl1" runat="server"></td>
<td align="right"><asp:Label ID="lbl2" runat="server"></td>
</tr>
</table>



希望您能找到解决方案..



谢谢
灰烬



Hope you got your solution..



Thanks
Ashish


这篇关于在网格视图中对齐控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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