Datagrid onclick change cell backcolor

Discussion in 'ASP .Net' started by Franck, Jun 7, 2005.

  1. Franck

    Franck Guest

    Hi,
    is it possible to change datagrid cell backcolor when user click on it
    ?

    Thks for help.
     
    Franck, Jun 7, 2005
    #1
    1. Advertising

  2. Sure,

    In either ItemDataBound or PreRender event get to the cell and set
    Attributes["onclick"]="onCellClick(this)";

    In javascript function onCellClick set visual parameters or apply a css
    style to the cell referenced by the input parameter.

    Eliyahu

    "Franck" <> wrote in message
    news:...
    > Hi,
    > is it possible to change datagrid cell backcolor when user click on it
    > ?
    >
    > Thks for help.
    >
     
    Eliyahu Goldin, Jun 7, 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. jm
    Replies:
    3
    Views:
    2,908
  2. rjl
    Replies:
    5
    Views:
    637
  3. Mike P
    Replies:
    1
    Views:
    3,894
    harlequinben
    Aug 30, 2006
  4. Todd Q

    Setting cell backcolor

    Todd Q, Aug 18, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    174
    Todd Q
    Aug 19, 2004
  5. feel

    how to change backcolor on cell at runtime for c# ?

    feel, Jul 27, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    176
    Eliyahu Goldin
    Jul 27, 2005
Loading...

Share This Page