Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
DarthMcAdam #1
Fixing Column Widths Permanently
I have a datagrid that I'm using to show a list of hierarchical data,
much like a tree-view. I won't go into the detail, suffice to say that
the reason I'm doing this is because of the poor quality of the data
(imported from a legacy system) and the manner in which the database
has had to be designed to accommodate this; in no way is it ideal, but
we have no other options but to do it this way.
Anyhoo, when I expand each level (columns going left-to-right), I'm
finding that if the text in the next column is wider than the
column-width that has been set, it expands to some degree to
accommodate the text.
Does anyone know how I can possibly fix the widths to prevent them from
widening/narrowing so that the surrounding columns don't 'shift' from
right-to-left and back again?
Just so you know, I've set the following values:
ItemStyle-Width
HeaderStyle-Width
ItemStyle-CssClass (width defined in the class)
I've also tried setting text-overflow: ellipsis, but it didn't do
anything! A shame, since that would have been perfect. I've had
moderate success with Style.Add("WORD-BREAK", "break-all"), but it's
still not perfect and in any case, the results are not great.
Any help on this would be appreciated.
DarthMcAdam Guest
-
AdvancedDataGrid column widths
Hi, Is is possible to configure the AdvancedDataGrid so that the column widths are determined by the data displayed, so that each column is as... -
Custom Column Widths
I have a datagrid which displays five columns of data. Since several columns display "Y" or "N" or 1-9 I have modified all the column widths to... -
Datagrid column widths
I try to format the column widths in the property builder/ Format area. Then when I run it the formating is not there??? -- ... -
consistent column widths
ASP.NET 2003. Two DataGrids, six columns each, one grid atop the other. I need to have the columns line up, i.e., DataGrid1 Col(1) lined up w/... -
Report column widths
I would like to have reports whose columns adjust horizontally to data width. Years ago I used filemaker and it had a 'slide' capability for... -
Elton Wang #2
Re: Fixing Column Widths Permanently
One way to workaround is to trim text to fixed length and the assign whole
text to ToolTip of the cell.
HTH
"DarthMcAdam" <adam@adsandtaz.com> wrote in message
news:1129296870.556371.260710@o13g2000cwo.googlegr oups.com...>I have a datagrid that I'm using to show a list of hierarchical data,
> much like a tree-view. I won't go into the detail, suffice to say that
> the reason I'm doing this is because of the poor quality of the data
> (imported from a legacy system) and the manner in which the database
> has had to be designed to accommodate this; in no way is it ideal, but
> we have no other options but to do it this way.
>
> Anyhoo, when I expand each level (columns going left-to-right), I'm
> finding that if the text in the next column is wider than the
> column-width that has been set, it expands to some degree to
> accommodate the text.
>
> Does anyone know how I can possibly fix the widths to prevent them from
> widening/narrowing so that the surrounding columns don't 'shift' from
> right-to-left and back again?
>
> Just so you know, I've set the following values:
> ItemStyle-Width
> HeaderStyle-Width
> ItemStyle-CssClass (width defined in the class)
>
> I've also tried setting text-overflow: ellipsis, but it didn't do
> anything! A shame, since that would have been perfect. I've had
> moderate success with Style.Add("WORD-BREAK", "break-all"), but it's
> still not perfect and in any case, the results are not great.
>
> Any help on this would be appreciated.
>
Elton Wang Guest



Reply With Quote

