|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGrid Row Auto-SizeCan Someone please help me get the DATAGRID to keep the row size consistent
when there is 1 row or 50 rows. Right now, if the datagrid has several rows of data, it is ok, and looks like a normal data grid. However, if the data goes to 1, 2, 3, etc rows of data, the grid will try to AUTO-SIZE the data row size, making the few rows of data take up the entire grid size.... This make the end result look really bad.... Please help with you ideas... I have searched everywhere for a solution to this... Thanks, Bruce Bruce Pullum wrote:
> Can Someone please help me get the DATAGRID to keep the row size consistent I've not tested this out, but try reducing the vertical length of the > when there is 1 row or 50 rows. Right now, if the datagrid has several rows > of data, it is ok, and looks like a normal data grid. However, if the data > goes to 1, 2, 3, etc rows of data, the grid will try to AUTO-SIZE the data > row size, making the few rows of data take up the entire grid size.... This > make the end result look really bad.... > > Please help with you ideas... I have searched everywhere for a solution to > this... > > Thanks, > Bruce datagrid in design view. if there's a couple of inches in design view, it seems to try and fill to this size even if there's only 1-2 rows --as if it's using the design-view's size as a minimum size. so try reducing this minimum size. mark You have to assign the width of every datagrid cell in the .aspx file. In
Vis Studio this is within the html view. Using a templated column it's liek this: <asp:TemplateColumn HeaderText="Name"> <ItemTemplate> <asp:Label id="Name" width=60 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'> </asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox id="NameEdit" width=130 runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'> </asp:TextBox> </EditItemTemplate> </asp:TemplateColumn> TC Show quoteHide quote "Mark Newby" <m***@newby.plus.com> wrote in message news:426FAA12.7060907@newby.plus.com... > Bruce Pullum wrote: >> Can Someone please help me get the DATAGRID to keep the row size >> consistent when there is 1 row or 50 rows. Right now, if the datagrid >> has several rows of data, it is ok, and looks like a normal data grid. >> However, if the data goes to 1, 2, 3, etc rows of data, the grid will try >> to AUTO-SIZE the data row size, making the few rows of data take up the >> entire grid size.... This make the end result look really bad.... >> Please help with you ideas... I have searched everywhere for a solution >> to this... >> >> Thanks, >> Bruce > > I've not tested this out, but try reducing the vertical length of the > datagrid in design view. if there's a couple of inches in design view, it > seems to try and fill to this size even if there's only 1-2 rows --as if > it's using the design-view's size as a minimum size. so try reducing this > minimum size. > > > mark
Other interesting topics
What is Place of Managed C++ in .NET?
long time transaction VS Authentication (mixed mode) serious problem encounter in VS.net refresh schema in designer Error in OLEDB Transaction Mini Project - Beginner in Visual Studio .NET Connection to SQL 2000 on Win 2003 Server Regarding Browse information(ALT-F12) feature same as VS 6.0 Invalid Property Value Error |
|||||||||||||||||||||||