Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Column won't resize in datagrid

Reply
Thread Tools

Column won't resize in datagrid

 
 
VB Programmer
Guest
Posts: n/a
 
      09-25-2004
I cannot get my first 2 columns to adhear to my width settings. Any ideas?

The datagrid is defined as:

<aspataGrid id="dgLog" runat="server" Width="990px" Height="96px"
BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" BackColor="White" CellPadding="3"
Font-Names="Verdana" AutoGenerateColumns="False"
GridLines="Vertical" Font-Size="X-Small">
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#008A8C"></SelectedItemStyle>
<AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
<ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
<HeaderStyle Font-Names="Verdana" Font-Bold="True"
HorizontalAlign="Center" ForeColor="White"
BackColor="#000084"></HeaderStyle>
<FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
<Columns>
<asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Subject" HeaderText="Subject">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
<HeaderStyle Width="250px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<PagerStyle HorizontalAlign="Center" ForeColor="Black"
BackColor="#999999" Mode="NumericPages"></PagerStyle>
</aspataGrid>


 
Reply With Quote
 
 
 
 
Juno
Guest
Posts: n/a
 
      09-26-2004
Hi,

I saw you set the width of datagrid to 990px, however you aslo defined each
columns' width(150px,250px,250px).
And 150+250+250 not equals to 990. So what are you want datagrid to be?

--
Juno
MCSD.NET, MCDBA, MCSE
----------------------------------------------------------
Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
DataForm.NET - The most powerful data entry web server control for ASP.NET



"VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote in message
news:(E-Mail Removed)...
> I cannot get my first 2 columns to adhear to my width settings. Any

ideas?
>
> The datagrid is defined as:
>
> <aspataGrid id="dgLog" runat="server" Width="990px" Height="96px"
> BorderColor="#999999" BorderStyle="None"
> BorderWidth="1px" BackColor="White" CellPadding="3"
> Font-Names="Verdana" AutoGenerateColumns="False"
> GridLines="Vertical" Font-Size="X-Small">
> <SelectedItemStyle Font-Bold="True" ForeColor="White"
> BackColor="#008A8C"></SelectedItemStyle>
> <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
> <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
> <HeaderStyle Font-Names="Verdana" Font-Bold="True"
> HorizontalAlign="Center" ForeColor="White"
> BackColor="#000084"></HeaderStyle>
> <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
> <Columns>
> <asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
> <HeaderStyle Width="150px"></HeaderStyle>
> </asp:BoundColumn>
> <asp:BoundColumn DataField="Subject" HeaderText="Subject">
> <HeaderStyle Width="250px"></HeaderStyle>
> </asp:BoundColumn>
> <asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
> <HeaderStyle Width="250px"></HeaderStyle>
> </asp:BoundColumn>
> </Columns>
> <PagerStyle HorizontalAlign="Center" ForeColor="Black"
> BackColor="#999999" Mode="NumericPages"></PagerStyle>
> </aspataGrid>
>
>



 
Reply With Quote
 
 
 
 
VB Programmer
Guest
Posts: n/a
 
      09-28-2004
I want it to match the indiv widths. Since the dg width is bigger does it
obsolete the others?

"Juno" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I saw you set the width of datagrid to 990px, however you aslo defined

each
> columns' width(150px,250px,250px).
> And 150+250+250 not equals to 990. So what are you want datagrid to be?


>
> --
> Juno
> MCSD.NET, MCDBA, MCSE
> ----------------------------------------------------------
> Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
> DataForm.NET - The most powerful data entry web server control for ASP.NET
>
>
>
> "VB Programmer" <Dont*NoSpam-Please*@jEmail.com> wrote in message
> news:(E-Mail Removed)...
> > I cannot get my first 2 columns to adhear to my width settings. Any

> ideas?
> >
> > The datagrid is defined as:
> >
> > <aspataGrid id="dgLog" runat="server" Width="990px" Height="96px"
> > BorderColor="#999999" BorderStyle="None"
> > BorderWidth="1px" BackColor="White" CellPadding="3"
> > Font-Names="Verdana" AutoGenerateColumns="False"
> > GridLines="Vertical" Font-Size="X-Small">
> > <SelectedItemStyle Font-Bold="True" ForeColor="White"
> > BackColor="#008A8C"></SelectedItemStyle>
> > <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
> > <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
> > <HeaderStyle Font-Names="Verdana" Font-Bold="True"
> > HorizontalAlign="Center" ForeColor="White"
> > BackColor="#000084"></HeaderStyle>
> > <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
> > <Columns>
> > <asp:BoundColumn DataField="EmailSent" HeaderText="Date Time">
> > <HeaderStyle Width="150px"></HeaderStyle>
> > </asp:BoundColumn>
> > <asp:BoundColumn DataField="Subject" HeaderText="Subject">
> > <HeaderStyle Width="250px"></HeaderStyle>
> > </asp:BoundColumn>
> > <asp:BoundColumn DataField="Recipients" HeaderText="Recipients">
> > <HeaderStyle Width="250px"></HeaderStyle>
> > </asp:BoundColumn>
> > </Columns>
> > <PagerStyle HorizontalAlign="Center" ForeColor="Black"
> > BackColor="#999999" Mode="NumericPages"></PagerStyle>
> > </aspataGrid>
> >
> >

>
>



 
Reply With Quote
 
EasyDotNet Inc
Guest
Posts: n/a
 
      09-28-2004
Hi,

You can set width of datagrid to 100% and only set width of two columns
of three.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid Column Resize Dragon ASP .Net 0 05-08-2007 03:45 PM
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
Resize datagrid column depending on text enter by user pramay ASP .Net Datagrid Control 0 07-15-2005 05:29 AM
how do i access a dropdownlists selected value in a datagrid edititemtemplate column from the selectedindexchanged event of another dropdownlist in a datagrid edititemtemplate column Dave M ASP .Net Datagrid Control 0 12-14-2004 11:53 AM
Column won't resize in datagrid VB Programmer ASP .Net Datagrid Control 2 09-28-2004 02:11 AM



Advertisments