Gridview具有可调整大小的列 [英] Gridview with resizable columns
本文介绍了Gridview具有可调整大小的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过这段代码编写gridview我需要通过拖动来调整列的大小,我搜索谷歌越来越多但它不起作用,我该怎么办?感谢您的帮助。
我的代码:
我尝试过:
< ; blockquote class =quote>< div class =op> Quote:< / div> < asp:GridView ID =grdhesListclass =table table-bordered table-responsive Grd_tablerunat =serverAutoGenerateColumns =FalseHeaderStyle-CssClass =FixedHeaderstyle =height:400px; overflow:auto >
< Columns>
< asp:BoundField DataField =hesNameHeaderText =نام>
< HeaderStyle Width =500px/>
< / asp:BoundField>
< asp:BoundField DataField =hesCodeHeaderText =کد>
< HeaderStyle Width =300px/>
< / asp:BoundField>
< asp:TemplateField>
< ItemTemplate>
< asp:LinkButton ID =lnkSelectrunat =serverOnClientClick =return GetSelectedRow(this)CssClass =button_of_grid>انتخاب< / asp:LinkButton>
< / ItemTemplate>
< / asp:TemplateField>
< / Columns>< / blockquote>
解决方案
您可以使用jQuery,如下所示 -
GridView中的列调整大小 [ ^ ]
I write gridview by this code I need to resize columns by dragging ,I search google more and more but it doesnt work, what should I do?thanks for your help.
my code:
What I have tried:
<blockquote class="quote"><div class="op">Quote:</div> <asp:GridView ID="grdhesList" class="table table-bordered table-responsive Grd_table" runat="server" AutoGenerateColumns="False" HeaderStyle-CssClass="FixedHeader" style="height:400px; overflow:auto" > <Columns> <asp:BoundField DataField="hesName" HeaderText="نام "> <HeaderStyle Width="500px" /> </asp:BoundField> <asp:BoundField DataField="hesCode" HeaderText="کد "> <HeaderStyle Width="300px" /> </asp:BoundField> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lnkSelect" runat="server" OnClientClick="return GetSelectedRow(this)" CssClass="button_of_grid">انتخاب</asp:LinkButton> </ItemTemplate> </asp:TemplateField> </Columns></blockquote>
解决方案
You can use jQuery for it as below -
Column Resizing in GridView[^]
这篇关于Gridview具有可调整大小的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文