Datagrid - Conditional Buttons/links

Discussion in 'ASP .Net' started by bijoy, Mar 21, 2005.

  1. bijoy

    bijoy Guest

    My datagrid displays the following info: Date, Expected Users, Number
    of Events

    I want it to behave as follows:

    For each row, if the value of Expected Users is greater than 5000, then
    I display the value in RED and make it a link. Otherwise just display
    the text in regular font. The link should fire a server-side event. I
    will use this to display additional information on the page about the
    clicked item.

    The text in RED part was easy..

    How do I go about displaying conditional links that trigger a server
    side event?

    Bijoy
     
    bijoy, Mar 21, 2005
    #1
    1. Advertising

  2. bijoy

    Elton Wang Guest

    Hi bijoy,

    You can add both LinkButton Lable in a TemplateColumn.
    Then in datagrid_ItemDataBound event according to your
    condition set only one of them visible. The linkButton can
    fire datagrid_ItemCommand event.

    HTH

    Elton Wang



    >-----Original Message-----
    >My datagrid displays the following info: Date, Expected

    Users, Number
    >of Events
    >
    >I want it to behave as follows:
    >
    >For each row, if the value of Expected Users is greater

    than 5000, then
    >I display the value in RED and make it a link. Otherwise

    just display
    >the text in regular font. The link should fire a server-

    side event. I
    >will use this to display additional information on the

    page about the
    >clicked item.
    >
    >The text in RED part was easy..
    >
    >How do I go about displaying conditional links that

    trigger a server
    >side event?
    >
    >Bijoy
    >
    >.
    >
     
    Elton Wang, Mar 22, 2005
    #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. JC
    Replies:
    2
    Views:
    3,590
  2. Alec S.
    Replies:
    10
    Views:
    10,317
    Alec S.
    Apr 16, 2005
  3. Jeremy Jones

    Datagrid Nav buttons and numeric buttons

    Jeremy Jones, Mar 21, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    642
    Masudur
    Mar 22, 2007
  4. Orest Kinasevych
    Replies:
    1
    Views:
    137
    Sean Jorden
    Aug 29, 2003
  5. Sjon

    Radio buttons conditional submit

    Sjon, Dec 14, 2004, in forum: Javascript
    Replies:
    4
    Views:
    249
    Thomas 'PointedEars' Lahn
    Jan 29, 2005
Loading...

Share This Page