bound columns of a datagrid

Discussion in 'ASP .Net Datagrid Control' started by Sabina, Feb 17, 2005.

  1. Sabina

    Sabina Guest

    i have a datagrid with few bound columns.i want to make the first column
    clickable.can i make a bound column clickable and write a handler for
    that.if that is not possible what is the otherway of doing it.
    when i click on the column i should be able to get the value of a hidden
    column of the selected row and pass it on to another page.the key field
    column is hidden.
    thanks in advance
    sabina
    Sabina, Feb 17, 2005
    #1
    1. Advertising

  2. Sabina

    Elton Wang Guest

    Use HyperLinkColumn

    HTH,

    Elton Wang


    >-----Original Message-----
    >i have a datagrid with few bound columns.i want to make

    the first column
    >clickable.can i make a bound column clickable and write a

    handler for
    >that.if that is not possible what is the otherway of

    doing it.
    >when i click on the column i should be able to get the

    value of a hidden
    >column of the selected row and pass it on to another

    page.the key field
    >column is hidden.
    >thanks in advance
    >sabina
    >
    >
    >.
    >
    Elton Wang, Feb 17, 2005
    #2
    1. Advertising

  3. Sabina

    Sabina Guest

    i have tried using hyperlink column but the problem i faced there was it can
    pass the hyperlinked columns value to the navigateurl page.what i need to
    pass to the navigate url page is the value of a invisible column of the
    clicked row.

    thanks
    sabina




    "Elton Wang" <> wrote in message
    news:294b01c51501$14118410$...
    > Use HyperLinkColumn
    >
    > HTH,
    >
    > Elton Wang
    >
    >
    > >-----Original Message-----
    > >i have a datagrid with few bound columns.i want to make

    > the first column
    > >clickable.can i make a bound column clickable and write a

    > handler for
    > >that.if that is not possible what is the otherway of

    > doing it.
    > >when i click on the column i should be able to get the

    > value of a hidden
    > >column of the selected row and pass it on to another

    > page.the key field
    > >column is hidden.
    > >thanks in advance
    > >sabina
    > >
    > >
    > >.
    > >
    Sabina, Feb 21, 2005
    #3
  4. Sabina

    Elton Wang Guest

    You can't directly get a value from invisible column after
    postback. So either you get it from datagrid's underlying
    data source (if you set P-Key column invisible, it is also
    unavailable) or use HyperLinkColumn and in
    datagrid_ItemDataBound event rebuild NavigateUrl with a
    query string like

    HyperLink link = (HyperLink)e.Item.Cells[colindex].Controls
    [0];
    link.NavigateUrl = url + "?id=" + dataFromHidenCol;

    HTH

    Elton Wang

    >-----Original Message-----
    >i have tried using hyperlink column but the problem i

    faced there was it can
    >pass the hyperlinked columns value to the navigateurl

    page.what i need to
    >pass to the navigate url page is the value of a invisible

    column of the
    >clicked row.
    >
    >thanks
    >sabina
    >
    >
    >
    >
    >"Elton Wang" <> wrote

    in message
    >news:294b01c51501$14118410$...
    >> Use HyperLinkColumn
    >>
    >> HTH,
    >>
    >> Elton Wang
    >>
    >>
    >> >-----Original Message-----
    >> >i have a datagrid with few bound columns.i want to make

    >> the first column
    >> >clickable.can i make a bound column clickable and

    write a
    >> handler for
    >> >that.if that is not possible what is the otherway of

    >> doing it.
    >> >when i click on the column i should be able to get the

    >> value of a hidden
    >> >column of the selected row and pass it on to another

    >> page.the key field
    >> >column is hidden.
    >> >thanks in advance
    >> >sabina
    >> >
    >> >
    >> >.
    >> >

    >
    >
    >.
    >
    Elton Wang, Feb 21, 2005
    #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. Julie Barnet

    Datagrid bound columns

    Julie Barnet, Dec 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    412
    Julie Barnet
    Dec 2, 2003
  2. Dan
    Replies:
    2
    Views:
    3,444
  3. =?Utf-8?B?RGF2aWQ=?=

    Help a newbie... (DataGrid bound & template columns)

    =?Utf-8?B?RGF2aWQ=?=, Feb 7, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    405
    Vadivel Kumar
    Feb 10, 2005
  4. =?Utf-8?B?Sm9u?=

    Datagrid, adding bound columns.

    =?Utf-8?B?Sm9u?=, Feb 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    414
    =?Utf-8?B?Sm9u?=
    Feb 15, 2006
  5. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    843
    Vinki
    Apr 25, 2007
Loading...

Share This Page