Hello.
I want WebGrid cell to wrap it's content.
In NetAdvantage 2007.1.1071 it could be archieved by setting
e.Layout.Bands[0].Columns[0].CellMultiline = Infragistics.WebUI.UltraWebGrid.CellMultiline.Yes;
I installed NetAdvantage 2008.2.2110 and get some odd result: the cell with such settings span it's content to the right cell and so on.
It takes plase only when
UltraWebGrid1.DisplayLayout.LoadOnDemand = Infragistics.WebUI.UltraWebGrid.LoadOnDemand.Xml;
What the problem and how can i handle it?
Thanks in advance,
Aleksey.
The sample
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<div>
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server" OnInitializeDataSource="UltraWebGrid1_InitializeDataSource" OnInitializeLayout="UltraWebGrid1_InitializeLayout">
</igtbl:UltraWebGrid>
</div>
</body>
</html>
pagecode:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default2 : System.Web.UI.Page
{
//this is the problem point
}
dt.Columns.Add(new DataColumn("FirstName", typeof(string)));
UltraWebGrid1.DataSource = dt;
What errors are you getting? Can you please be more specific?
Which version of Net Advantage controls are you using?
Thanks
Sarita
It does not work.
Please provide another working solution.
Thanks.
Hi,
I downloaded the sample and tested it. I found you have only allowed the cellMultiLine and CellStyle set to Wrap for Column[0]. Please add these three lines and run the application again and see what happens.
e.Layout.Bands[0].Columns[1].CellMultiline = Infragistics.WebUI.UltraWebGrid.CellMultiline.Yes;
e.Layout.RowSizingDefault = Infragistics.WebUI.UltraWebGrid.AllowSizing.Free;
Please change the width of the columns and test it.
Hope it helps.