Different columns for alternating rows in gridview

Discussion in 'ASP .Net' started by tsedward@wingate.edu, Apr 13, 2007.

  1. Guest

    I am creating a databound gridview. The last cell of each row can,
    and usually does, contain a lot of text. Is there any way that I
    could drop this last cell down into the next line on the gridview?
    This would mean that every other row would ignore the columns and
    consist of one large column. Is this possible?
     
    , Apr 13, 2007
    #1
    1. Advertising

  2. Yes, you can do this by intercepting the data binding event and writing a
    second row when it binds that row.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *********************************************
    Think outside the box!
    *********************************************
    <> wrote in message
    news:...
    >I am creating a databound gridview. The last cell of each row can,
    > and usually does, contain a lot of text. Is there any way that I
    > could drop this last cell down into the next line on the gridview?
    > This would mean that every other row would ignore the columns and
    > consist of one large column. Is this possible?
    >
     
    Cowboy \(Gregory A. Beamer\), Apr 13, 2007
    #2
    1. Advertising

  3. Consider using a repeater instead of a gridview. You can make the item
    template out of two rows and databind in a regular way.

    --
    Eliyahu Goldin,
    Software Developer & Consultant
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    <> wrote in message
    news:...
    >I am creating a databound gridview. The last cell of each row can,
    > and usually does, contain a lot of text. Is there any way that I
    > could drop this last cell down into the next line on the gridview?
    > This would mean that every other row would ignore the columns and
    > consist of one large column. Is this possible?
    >
     
    Eliyahu Goldin, Apr 15, 2007
    #3
  4. Guest

    Thanks for both replies. The repeater worked great.
     
    , Apr 17, 2007
    #4
    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. MattC
    Replies:
    0
    Views:
    1,597
    MattC
    Mar 22, 2005
  2. helpful sql
    Replies:
    0
    Views:
    830
    helpful sql
    May 19, 2005
  3. Stuart Shay
    Replies:
    3
    Views:
    13,204
    Darkmoor
    Aug 20, 2010
  4. Sachin
    Replies:
    1
    Views:
    380
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jun 1, 2007
  5. MangroveRoot

    alternating text/image rows

    MangroveRoot, Nov 4, 2007, in forum: HTML
    Replies:
    7
    Views:
    433
    Adrienne Boswell
    Nov 4, 2007
Loading...

Share This Page