GridView对齐方式 [英] GridView Alignment

查看:79
本文介绍了GridView对齐方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...你能帮我...我的问题是当我从下拉列表中选择一些值并生成报告并在gridview上显示所有字段时...我的问题是如果我选择更多许多下拉列表中的字段,如果这些字段中的数据较大,则我的gridview会扩大尺寸,并且我必须横向滚动才能看到网格元素...所以我如何限制网格的大小,以便正确地拟合数据网格?
thanx

Hi...can any of u guys help me...my issue is when i select some values from drop downs and generate a report and display all the fields on a gridview...my problem is if i select more fields from many drop downs and if the data in those fields are larger my gridview expands in size and i have to scroll sidewise to see the grid elements...so how shd i restrict the size of grid so that the data is fitted correctly in the grid?
thanx

推荐答案

您是否已为Dropdown列表和网格视图定义width参数.如果没有,请尝试使用这些控件的Style属性进行设置.那应该可以解决问题.

HTH!
Have you defined the width parameter for the Dropdown list and the grid view. If not try setting it using the Style attribute for these controls. That should do the trick.

HTH!


<pre><asp:Panel Width="250" runat="server" style="overflow:scroll;">
       <asp:GridView ID="GridView1" runat="server" >
       </asp:GridView></asp:Panel>






将gridview的宽度设置为Width ="40%".您需要多少%的gridview.您还可以设置下拉列表的宽度.
set the width for the gridview as Width="40%". what ever % width you need for gridview. you can also set width for dropdown list.


这篇关于GridView对齐方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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