We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

column text wrapping

Thread ID:

Created:

Updated:

Platform:

Replies:

117588 Nov 12,2014 03:20 PM UTC Nov 17,2014 04:55 AM UTC JavaScript 3
loading
Tags: ejGrid
Hoang Dang
Asked On November 12, 2014 03:20 PM UTC

Hi,

I'm trying to get the text in columns with specific width to wrap to the next line if the text is too long but it's not working. I specified allowTextWrap:true on the ejGrid according to the documentation but it doesn't work. Can you please provide an example of text wrapping.

Thanks,
Hoang

Mohammed Farook J [Syncfusion]
Replied On November 13, 2014 10:05 AM UTC

Hi Hoang,

Thanks for using Syncfusion products.

We have analyzed the reported issue “Scrolling option disable in grid the “autoTextWrap “property is not working in grid”.We have confirmed that the issue with “AllowTextWrap ” is a defect and we have logged a defect report. The fix for this issue is estimated to be available on Vol 3 Service Pack 1 release at third week of November 2014.

But as workaround we have overridden the “white-space” css property of Grid row cell to resolve the  issue. Please refers the following code snippets.

<style>

       .e-rowcell {

            white-space: normal !important;

        }

    </style>

<div id="Grid"></div>

 

    <script type="text/javascript">

       $("#Grid").ejGrid({

                // the datasource "window.gridData" is referred from jsondata.min.js

                dataSource: window.gridData,

                allowPaging:true,

                           pageSettings:{pageCount:4},

                          

                columns: [

                             { field: "OrderID", headerText: "Order ID",  textAlign: ej.TextAlign.Right},

                             { field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right},

                             { field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, width:80,format: "{0:C}"},

                             { field: "ShipCity", headerText: "Ship City",width:80},

                             { field: "ShipName", headerText: "Ship Name" }

                ]

       });

    </script>

For your convenience we have modified the sample and the same can be downloaded from below link.

Sample: Gridwrap.zip

Please let us know if you need any further assistance.

Regards,
J.Mohammed Farook


Hoang Dang
Replied On November 13, 2014 04:20 PM UTC

Thanks Mohammed. The workaround works for me. 

Prasanna Kumar Viswanathan [Syncfusion]
Replied On November 17, 2014 04:55 AM UTC

Hi Hoang,

Thanks for your update,

Regards,
Prasanna Kumar N.S.V

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;