GridView Truncate Heading
Posted on 2006-03-21
we have a gridview that we are manually setting up the columns in.
the column widths are defined by the user, but occasionly they specify a width that is smaller than required for the heading text.
the gridview automatically resizes the column and makes the other columns slightly smaller to fix this up.
the problem is that we dynamically add controls above and below the gridview to filtering and totalling so when the gridview is automatically resized the controls dont match up.
when we ask the column width, even after calling the databind method, it returns the width we set it as, no what it has been resized too.
how do i get the real column width, or if that isn't possible, could i somehow truncate the heading so it stays the correct width.
note: when i talk about columns, i'm referrring to DataControlField's which are what dataview's call columns.