如何在GridView 编辑使某栏字段显示多行状态?
新闻编辑采用GridView中的功能中的编辑、删除<asp:BoundField DataField="newsContent" HeaderText="内容" /> 如何将单行变成多行显示/更新?
详情如下
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="False" OnRowCancelingEdit="GV_RowCancelingEdit"
OnRowCommand="GV_RowCommand" OnRowDeleting="GV_RowDeleting" OnRowEditing="GV_RowEditing"
OnRowUpdating="GV_RowUpdating" Width="90%">
<Columns>
<asp:BoundField DataField="newsId" HeaderText="新闻编号" ReadOnly="True" />
<asp:BoundField DataField="newsTitle" HeaderText="标题" />
<asp:BoundField DataField="newsContent" HeaderText="内容" /> 如何将单行变成多行显示?点击edit后,update状态
<asp:CommandField ShowEditButton="True" />
<asp:CommandField ShowDeleteButton="True" />
</Columns>
</asp:GridView>
--------------------编程问答-------------------- //正常换行
GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
//自动换行
GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word"); --------------------编程问答-------------------- 谢谢LZ提示,能否具体些?如何将上面的语法替换下面?
<asp:BoundField DataField="newsContent" HeaderText="内容" /> 如何将单行变成多行显示/更新?
--------------------编程问答-------------------- GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
很好用 --------------------编程问答-------------------- ? 两年前的贴?
是说梦姐咋会只有这点分呢
补充:.NET技术 , ASP.NET