I have been using Gridview to display data.i set the width of each column using Itemstyle but the Problem is that if the content of that column is bigger than the column width then it will automatically increase column width but i want to break the word if content is bigger than column width…plz help me….
Share
EDIT: Well after investigation it turns out that instead of
spanif we usedivand add ‘word-wrap:break-word’ attribute to style it does the trick. Here is the sample: http://jsfiddle.net/amantur/UYAb7/PS:- But please note that
word-wrap:break-wordmight not be supported by all browsers and version. If this poses a problem, I suggest you write a function that takes in ahrefand link text and create a link with first few chacters + … and set complete word as tooltip usingtitleproperty ofanchorelement:you can added inner content inside a
spanelement and set itsmax-widthproperty to the width of the column.Example: