<asp:TemplateColumn HeaderText="New EmpId"> <itemtemplate> <asp:Label ID="Deleted" runat="server" Style="word-wrap: break-word;" Text='<%# DataBinder.Eval(Container, "DataItem.EmpId_Temp") %>'></asp:Label> </itemtemplate> <headerstyle width="7%" /> </asp:TemplateColumn>
Quote:I have looked at your problem. Its seems this is an issue of IE8 or the word-wrap is not valid as per new HTML standard. A grid view is rendered as table and the data you pass in the gridview, directly goes inside a TD s. And in ie 8 even if we put word -wrap in TD , it does not work. One way you can solve your problem by using TemplateField. You can add your data inside a container like DIV and give the word-wrap:break-word and the width property. Like- ASP.NET <asp:TemplateField HeaderText="Display On Issue Summ?" HeaderStyle-Width="40%" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40%"> <ItemTemplate> <div style="word-wrap: break-word; width: 300px; border: solid 1px red;"> <%#Eval("DisplayOnIssueSummary") %></div> </ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="Display On Issue Summ?" HeaderStyle-Width="40%" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40%"> <ItemTemplate> <div style="word-wrap: break-word; width: 300px; border: solid 1px red;"> <%#Eval("DisplayOnIssueSummary") %></div> </ItemTemplate> </asp:TemplateField>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)