Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1220
hiding overflow on grid cells
posted

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? 

 

Parents
  • 1220
    posted

    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);

        }

    }

     

     

Reply Children