GridView 列太长,设定ItemStyle-Width="200"无效
<%-- <asp:BoundField DataField="Codes" HeaderText="扫描的码" ItemStyle-HorizontalAlign="center" ItemStyle-Width="200"/>--%> <asp:TemplateField ItemStyle-Width="200px" HeaderText="扫描的码"> <ItemTemplate> <div style="width: 200px;word-wrap:break-word; "> <%# Eval("Codes")%> </div> </ItemTemplate> </asp:TemplateField>
https://*.com/questions/8587538/gridview-boundfield-break-long-string