This is a discussion on How to break text inside the asp.net datagrid columns that exceeds the width? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; To break the text that exceeds the width of ASP.net Datagrid web control or tables row width, Use CSS ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| To break the text that exceeds the width of ASP.net Datagrid web control or tables row width, Use CSS level 3 word-break property. Example for word-break property: td { word-break: break-all } Use the above code in your asp.net and see the magic. Note: This will works only in Internet Explorer 6 or above. If You find any code snippets that works with other browsers, please post it. |
| Sponsored Links |
| |||
| hi by inserting a space between string dynamically we can stop breaking layout of those text in a grid. use this javascrip to insert space. function InsertSpaceInString(textWithoutSpace,size,controlN ame) { var controlToBind = document.getElementById(controlName); var textWithSpace = ""; var temp = textWithoutSpace.split(" "); //alert(textWithoutSpace); for (var i = 0; i < temp.length; i++) { var spliter = ""; var remaining = ""; if (temp[i].length > size) { var loopCount = temp[i].length / size; remaining = temp[i]; for (var j = 1; j <= loopCount; j++) { var a = remaining.substring(0, size); remaining = remaining.substring((size)); spliter = spliter + a + " "; } temp[i] = spliter + remaining; } textWithSpace = " " + textWithSpace + temp[i] + " "; } if (textWithSpace.length > 0) { var temperorary = textWithSpace.trim(); textWithSpace = temperorary; } controlToBind.innerHTML = textWithSpace; } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/html-css-javascript-coding-techniques/5269-how-break-text-inside-asp-net-datagrid-columns-exceeds-width.html | |||
| Posted By | For | Type | Date |
| CSS JavaScript: Blogs, Photos, Videos and more on Technorati | This thread | Refback | 02-26-2008 12:14 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to create index for all columns in a view? | oxygen | Database Support | 1 | 02-07-2008 01:53 AM |
| Break .exe into .pl | Vani Sri | Perl | 0 | 01-29-2008 05:34 AM |
| How do I check that text entered in a text form field is an integer? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 12:25 AM |
| Why doesn't <TABLE WIDTH="100%"> use the full browser width? | oxygen | HTML, CSS and Javascript Coding Techniques | 1 | 07-27-2007 03:38 AM |
| How to sort the datagrid columns in ascending order and decending order using c# dot? | Archer | C# Programming | 1 | 07-22-2007 11:28 PM |