GridView Formatting Issues

Discussion in 'ASP .Net Datagrid Control' started by Jay Lauffer, Jun 20, 2006.

  1. Jay Lauffer

    Jay Lauffer Guest

    Hello,

    I'm having problems getting the html table generated from GridView to meet
    the expected output format. I want to fix certain column widths, when I use
    the ItemStyle or ControlStyle widths they appear to make no difference.

    I saw another similar posting with no replies, is this simply not possible?

    Are there other controls out there (3rd party) which provide the GridView
    functionality but will generate HTML which will easily conform to the styles
    we are looking to apply?

    The biggest problem I have at the moment is that our grid changes between
    two different pages of data, on the first page we are filling our space, on
    the second page suddenly our right edge jumps 30 pixels to the left. This
    behavior is completely unacceptable in our application.

    We've worked around the incosistency in the vertical space by padding our
    dataset, but a Grid which could be fixed in both directions is ideal for our
    application needs.

    Is there a way to cause the GridView to generate COLGROUPS and COL tags?

    Any help here is appreciated,

    Jay Lauffer
     
    Jay Lauffer, Jun 20, 2006
    #1
    1. Advertising

  2. Jay Lauffer

    Marcus Guest

    Jay,

    I'm currently using this control for an application and the following
    worked for me: ItemStyle-Width="50px"

    see full example below

    <asp:BoundField HeaderText="ID" DataField="Exercise_ID"
    SortExpression="Exercise_ID" Visible="true" ItemStyle-Width="50px"
    ItemStyle-HorizontalAlign="Center" readonly="true"></asp:BoundField>

    Cheers
    Marcus


    Jay Lauffer wrote:

    > Hello,
    >
    > I'm having problems getting the html table generated from GridView to meet
    > the expected output format. I want to fix certain column widths, when I use
    > the ItemStyle or ControlStyle widths they appear to make no difference.
    >
    > I saw another similar posting with no replies, is this simply not possible?
    >
    > Are there other controls out there (3rd party) which provide the GridView
    > functionality but will generate HTML which will easily conform to the styles
    > we are looking to apply?
    >
    > The biggest problem I have at the moment is that our grid changes between
    > two different pages of data, on the first page we are filling our space, on
    > the second page suddenly our right edge jumps 30 pixels to the left. This
    > behavior is completely unacceptable in our application.
    >
    > We've worked around the incosistency in the vertical space by padding our
    > dataset, but a Grid which could be fixed in both directions is ideal for our
    > application needs.
    >
    > Is there a way to cause the GridView to generate COLGROUPS and COL tags?
    >
    > Any help here is appreciated,
    >
    > Jay Lauffer
     
    Marcus, Jun 20, 2006
    #2
    1. Advertising

  3. Jay Lauffer

    Jay Lauffer Guest

    Thanks Marcus,

    Apparently I need to set all of the column widths, if I attempt to fix a
    single column width the browser doesn't stretch the other columns to meet the
    space required.

    "Marcus" wrote:

    > Jay,
    >
    > I'm currently using this control for an application and the following
    > worked for me: ItemStyle-Width="50px"
    >
    > see full example below
    >
    > <asp:BoundField HeaderText="ID" DataField="Exercise_ID"
    > SortExpression="Exercise_ID" Visible="true" ItemStyle-Width="50px"
    > ItemStyle-HorizontalAlign="Center" readonly="true"></asp:BoundField>
    >
    > Cheers
    > Marcus
    >
    >
    > Jay Lauffer wrote:
    >
    > > Hello,
    > >
    > > I'm having problems getting the html table generated from GridView to meet
    > > the expected output format. I want to fix certain column widths, when I use
    > > the ItemStyle or ControlStyle widths they appear to make no difference.
    > >
    > > I saw another similar posting with no replies, is this simply not possible?
    > >
    > > Are there other controls out there (3rd party) which provide the GridView
    > > functionality but will generate HTML which will easily conform to the styles
    > > we are looking to apply?
    > >
    > > The biggest problem I have at the moment is that our grid changes between
    > > two different pages of data, on the first page we are filling our space, on
    > > the second page suddenly our right edge jumps 30 pixels to the left. This
    > > behavior is completely unacceptable in our application.
    > >
    > > We've worked around the incosistency in the vertical space by padding our
    > > dataset, but a Grid which could be fixed in both directions is ideal for our
    > > application needs.
    > >
    > > Is there a way to cause the GridView to generate COLGROUPS and COL tags?
    > >
    > > Any help here is appreciated,
    > >
    > > Jay Lauffer

    >
    >
     
    Jay Lauffer, Jun 20, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. coleenholley

    DataGrid Formatting Columns ISsues

    coleenholley, Jan 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    385
    =?Utf-8?B?RGF2aWQgQ29l?=
    Feb 1, 2004
  2. Not Me
    Replies:
    1
    Views:
    1,729
    sloan
    Feb 1, 2006
  3. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,977
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  4. Adam Monsen
    Replies:
    0
    Views:
    372
    Adam Monsen
    Dec 19, 2007
  5. David Shorthouse

    AJAX nested drop-down menus...IE formatting issues

    David Shorthouse, May 30, 2006, in forum: Javascript
    Replies:
    1
    Views:
    157
    David Shorthouse
    May 30, 2006
Loading...

Share This Page