GridView commandfield button based on recordset value?

Discussion in 'ASP .Net Web Controls' started by 11D.Universe, Jun 10, 2007.

  1. 11D.Universe

    11D.Universe Guest

    I've got a sql table containing a nullable int field named DataID.
    The field is displayed as part of a GridView.

    Is it possible to create a single CommandFieldButton column in the
    GridView containing a button where the text displayed is a function of
    the DataID field contents? For example, let's say if DataID is NULL,
    the button in that row would read "Fill" and if the DataID is not
    NULL, the button would read "Go"?

    So, in the above example the grid would look like:

    Button DataID
    -------- ---------
    Fill Null
    Go 123
    Fill Null
    Go 55
    11D.Universe, Jun 10, 2007
    #1
    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. Replies:
    2
    Views:
    18,085
    SamSabel
    Dec 16, 2009
  2. Leo
    Replies:
    0
    Views:
    2,059
  3. =?Utf-8?B?QnVydA==?=
    Replies:
    1
    Views:
    984
    =?Utf-8?B?QnVydA==?=
    Apr 9, 2006
  4. Kevin Frey
    Replies:
    0
    Views:
    428
    Kevin Frey
    Nov 19, 2006
  5. mt
    Replies:
    2
    Views:
    1,317
Loading...

Share This Page