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?
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);
}
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.
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????? :(
By changing the Text property of your cells, you're also changing the cells' Value. Summaries and group-by functionality both depend on the cell's value. So, this result would be expected.
aha..
there has to be a way i can add some marktup to the cell w/out changing the underlying value??
it looks like column summing happens at RENDER time??
because i overwrote render, added extra markup to cells, and called base.Render,
and all sums are still coming back as 0