dataGrid - link - popup window

Discussion in 'ASP .Net Datagrid Control' started by popsovy@rusmex.com, Feb 3, 2004.

  1. Guest

    I need to create a datagrid where the column headers (not the items) are links. When a user clicks on a link, it brings up a popup window.

    I guess the question is how to make the headers to be URLs but without using sorting, then associate client-side javascript to these headers.... or, is there a better way?

    Many thanks for your help.

    Zhenya
    http://www.rusmex.com
    , Feb 3, 2004
    #1
    1. Advertising

  2. Headers are cells too. In your itemcreated event handler trap for the header
    cell and then add a link to the header. It's similar to adding a webding.
    You may want to google for webding datagrid sort for a clearer picture. Here
    is one approach.
    if(e.item.itemtype == listitemtype.header)
    {
    linkbutton l = e.item.cells[0].controls[0];
    link.navigateurl = "<script> goes here to open up a popup
    }

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "" <> wrote in message
    news:...
    > I need to create a datagrid where the column headers (not the items) are

    links. When a user clicks on a link, it brings up a popup window.
    >
    > I guess the question is how to make the headers to be URLs but without

    using sorting, then associate client-side javascript to these headers....
    or, is there a better way?
    >
    > Many thanks for your help.
    >
    > Zhenya
    > http://www.rusmex.com
    Alvin Bruney [MVP], Feb 3, 2004
    #2
    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. LIN
    Replies:
    1
    Views:
    2,245
    Ravikanth[MVP]
    Aug 8, 2003
  2. Blue®
    Replies:
    4
    Views:
    774
    Blue®
    Sep 27, 2003
  3. Jiong Feng
    Replies:
    1
    Views:
    177
    Lasse Reichstein Nielsen
    May 15, 2004
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    499
    Randy Webb
    Jun 19, 2004
  5. Raffi
    Replies:
    4
    Views:
    202
    Dr John Stockton
    Aug 12, 2004
Loading...

Share This Page