hello i need to be able to hide text overflow on a grid with non fixed layout.
this can be achieved by inserting <div> inside each table cell with text overflow hidden.
is it possible to gain access to cell element on the server in order to enclose the text within a div?
ok,
so my fix is also no good,
because it breaks the column.footer.sum functionality. as well as outlookgroupby mask where i apply [sum:filed]
apparently the grid applies calculations to the actual table and not underlying data????? :(
yes, thank you,
yeah, the only reason for my hack above, is that i don't want to use table layout fixed.
thanks
Does the following also help? This code would be in InitializeLayout.
using Infragistics.WebUI.UltraWebGrid;...e.Layout.RowStyleDefault.TextOverflow = TextOverflow.Clip;e.Layout.RowStyleDefault.Wrap = false;
You might instead need to set either or both the TextOverflow and Wrap properties on the CellStyle properties of each column.
You might also need to set the grid's TableLayout property to Fixed to keep it from resizing your rows and columns. If setting TableLayout to Fixed isn't an option, then the solution you've mentioned may be the best solution, being the easiest and most efficient way to get the result you're after.
heres my quick solution..
void AddOverflowToCells(RowsCollection rows) {
if (rows == null || rows.Count < 0) return;
foreach (UltraGridRow row in rows) {
foreach (UltraGridCell cell in row.Cells)
cell.Text = string.Format( @"<div style=overflow:hidden;width:{0}>{1}</div>",cell.Column.Width, cell.Text);
AddOverflowToCells(row.Rows);
}