ItemDataBound

Discussion in 'ASP .Net' started by Shawn, Jan 21, 2004.

  1. Shawn

    Shawn Guest

    Hi.
    Is it possible to get the name of the boundcolumn's datafield in the
    datagrid_ItemDataBound sub?

    Shawn
    Shawn, Jan 21, 2004
    #1
    1. Advertising

  2. Shawn

    Alvin Bruney Guest

    Typically, this information is available in the sender object with the
    required casts
    As an example consider a button click event is generated
    Button btn = (Button)sender
    string str = btn.Text;
    This code should provide an idea as to how to go about solving your problem.
    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Shawn" <> wrote in message
    news:...
    > Hi.
    > Is it possible to get the name of the boundcolumn's datafield in the
    > datagrid_ItemDataBound sub?
    >
    > Shawn
    >
    >
    Alvin Bruney, Jan 24, 2004
    #2
    1. Advertising

  3. Shawn

    Shawn Guest

    I wish it was that simple.. I've looked for hours through Visual Studio's
    QuickWatch function without finding the value I'm after.

    Shawn

    "Alvin Bruney" <vapor at steaming post office> wrote in message
    news:...
    Typically, this information is available in the sender object with the
    required casts
    As an example consider a button click event is generated
    Button btn = (Button)sender
    string str = btn.Text;
    This code should provide an idea as to how to go about solving your problem.
    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Shawn" <> wrote in message
    news:...
    > Hi.
    > Is it possible to get the name of the boundcolumn's datafield in the
    > datagrid_ItemDataBound sub?
    >
    > Shawn
    >
    >
    Shawn, Jan 27, 2004
    #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. James G. Beldock

    ItemDataBound not received by grid in table?

    James G. Beldock, Jul 24, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    427
    James G. Beldock
    Jul 24, 2003
  2. Tina
    Replies:
    1
    Views:
    365
    Suresh
    Oct 14, 2003
  3. René Paschold

    Re: ItemDataBound in Repeater: FYI

    René Paschold, Oct 14, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    398
    René Paschold
    Oct 16, 2003
  4. Steve Klett

    inserting control in ItemDataBound

    Steve Klett, Nov 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    604
    Steve Klett
    Nov 13, 2003
  5. Peter Afonin
    Replies:
    2
    Views:
    444
    Peter Afonin
    Nov 19, 2003
Loading...

Share This Page