BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi James,
?
We have checked the column HeaderText with new line character <br> tag by enabled the disableHtmlEncode property in code behind and it works fine. Please refer to the following sample and code example,
Sample: Sample
protected void Page_Load(object sender, EventArgs e) { GridProperties gridmodel = new GridProperties(); List<Column> colList = new List<Column>(); Grid.Columns.Add(new Column() { Field = "OrderID", HeaderText = "Order ID", Width = "80" }); Grid.Columns.Add(new Column() { Field = "CustomerID", HeaderText = "Customer Id<br>break lines in a text<br>", disableHtmlEncode=true, TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "140" }); Grid.Columns.Add(new Column() { Field = "EmployeeID", HeaderText = "<br>", disableHtmlEncode=true, TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "110" }); Grid.Columns.Add(new Column() { Field = "Freight", HeaderText = "Freight", Format = "{0:D}", Width = "100" }); Grid.Columns.Add(new Column() { Field = "ShipCity", HeaderText = "Ship City", Width = "80" }); Grid.AllowPaging = true; Grid.DataSource = BindDataSource(); Grid.DataBind();
} |
? Screenshot: ? Could you please share the following details to find the cause?of this issue and to provide an appropriate solution at the earliest? ? 1. Essential Studio version and Browser version details. 2. Full code example of default page and controller. 3. Modified the provided sample as issue reproducible. ? Regards,?
Balaji Marimuthu
protected void Page_Load(object sender, EventArgs e) { GridProperties gridmodel = new GridProperties(); List<Column> colList = new List<Column>(); Grid.Columns.Add(new Column() { Field = "OrderID", HeaderText = "Order ID", Width = "80" }); Grid.Columns.Add(new Column() { Field = "CustomerID", HeaderText = "Customer ID", TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "140" }); Grid.Columns.Add(new Column() { Field = "EmployeeID", HeaderText = "Employee ID", TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "110" }); Grid.Columns.Add(new Column() { Field = "Freight", HeaderText = "Freight", Format = "{0:D}", Width = "100" }); Grid.Columns.Add(new Column() { Field = "ShipCity", HeaderText = "Ship<br>City", Width = "80" }); Grid.AllowPaging = true; Grid.AllowTextWrap = true; Grid.DataSource = BindDataSource(); Grid.DataBind();
|
[Default.aspx] <style> .e-grid .e-columnheader .e-headercelldiv { height: Auto; line-height: 18px; } .e-grid .e-columnheader .e-headercelldiv { margin-bottom: 2px; margin-top: 0; } |
[WebForm1.aspx] <style> .e-grid .e-columnheader .wrap .e-headercelldiv { height: Auto; line-height: 18px; } .e-grid .e-columnheader .wrap .e-headercelldiv { margin-bottom: 2px; margin-top: 0; } FlatGrid.Columns.Add(new Column() { Field = "OrderID", HeaderText = "Order ID", Width = "80" }); FlatGrid.Columns.Add(new Column() { Field = "CustomerID", HeaderText = "Customer ID", TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "140" }); FlatGrid.Columns.Add(new Column() { Field = "EmployeeID", HeaderText = "Employee ID", TextAlign = Syncfusion.JavaScript.TextAlign.Right, Width = "110" }); FlatGrid.Columns.Add(new Column() { Field = "Freight", HeaderText = "Freight", Format = "{0:D}", Width = "100" }); FlatGrid.Columns.Add(new Column() { Field = "ShipCity", HeaderText = "Ship<br>City", CssClass = "wrap", Width = "80" }); FlatGrid.AllowPaging = true; |