I have a WebDataGrid (10.2) which I used largely default settings for the cells. By default, the cells wrap text when the columns are sized to a smaller width than the cell contents. I would prefer they would just truncate the text without wrapping.
Anyone know how to do this?
Hi Radoslav,
I cannot use the tip you have mentioned because i need all the columns to be of different width.
I want the first row to be wrapped I dont want the text to be shown in 2,3 lines I want it to fit in one row if it exceeds the width i want to show only the text how much it fits in the width we give.
I also want mousehover to show the text hidden..
Hi,
But how can we call the class when Autogeneratecolumns property is set to true. And will it cause the issue of first row in versions of IE less than 8. If so how can it be overcomed?
Thanks,
Assyst
Hello,
Let me know if you have any questions on this.
Thanks
Hey Guys,
Try to set the width of the columns explicitly like this :
<style type="text/css"> tbody > tr > td.colExplWidth { width:30px;} </style>
the grid:
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="886px" AutoGenerateColumns="false"> <Columns> <ig:BoundDataField Key="Item" CssClass="colExplWidth"> </ig:BoundDataField>
<ig:WebDataGrid ID="WebDataGrid1" runat="server"
Height="350px" Width="886px" AutoGenerateColumns="false"> <Columns> <ig:BoundDataField Key="Item" CssClass="colExplWidth"> </ig:BoundDataField>
..................
Hope this helps.
Use this in your CSS styling class
tbody.igg_Item tr td{ overflow:hidden; white-space:nowrap;}
But after then also you will face a problem in Internet Explorer that first row still shows the wrapped text. I have been looking for a solution for that, but i didn't even got a reply for that. If you overcome that to please do reply me in hurry.
Thanks & Regards,