T
TB
Hi All:
I have this datagrid where space is very tight, and therefore I have to
make sure that everything fits within a fixed screen width regardless
of whether I am in list mode or in edit mode. But I have discovered
that it is not enough to simply specify the column widths by way of
'HeaderStyle-Width="25px" ItemStyle-Width="25px"'-type properties
inside in the <asp:BoundColumn> tags, because by default all the text
boxes in edit mode have the same length, greatly expanding the total
width of the datagrid each time I press the edit button.
So then I thought I could use the following style sheet entry (kindly
provided by somebody else in this forum but for another purpose):
..MyListItem td input
{
font-family: Verdana;
font-size:9px;
width:25px;
}
and the call it from datagrid: <EditItemStyle
CssClass="MyListitem"></EditItemStyle>
But of course the problem is then that while this entry does control
the text box width, it is common for ALL the columns, rendering it
useless, because I need each of the textboxes to have the same width as
their corresponding column widths expressed in the <asp:BoundColumn
DataField="Fieldname" HeaderText="Fieldname" HeaderStyle-Width="25px"
ItemStyle-Width="25px"></asp:BoundColumn> tags.
Any suggestions will be highly appreciated.
Thanks,
TB
I have this datagrid where space is very tight, and therefore I have to
make sure that everything fits within a fixed screen width regardless
of whether I am in list mode or in edit mode. But I have discovered
that it is not enough to simply specify the column widths by way of
'HeaderStyle-Width="25px" ItemStyle-Width="25px"'-type properties
inside in the <asp:BoundColumn> tags, because by default all the text
boxes in edit mode have the same length, greatly expanding the total
width of the datagrid each time I press the edit button.
So then I thought I could use the following style sheet entry (kindly
provided by somebody else in this forum but for another purpose):
..MyListItem td input
{
font-family: Verdana;
font-size:9px;
width:25px;
}
and the call it from datagrid: <EditItemStyle
CssClass="MyListitem"></EditItemStyle>
But of course the problem is then that while this entry does control
the text box width, it is common for ALL the columns, rendering it
useless, because I need each of the textboxes to have the same width as
their corresponding column widths expressed in the <asp:BoundColumn
DataField="Fieldname" HeaderText="Fieldname" HeaderStyle-Width="25px"
ItemStyle-Width="25px"></asp:BoundColumn> tags.
Any suggestions will be highly appreciated.
Thanks,
TB