Changing the color of cell on mouse over event in calendar control

Discussion in 'ASP .Net Web Controls' started by Garg, Mar 16, 2007.

  1. Garg

    Garg Guest

    Hi,

    I want to make the color of a cell change in my calendar control,
    whenever mouse is brought over that particular cell. How can I achieve
    this functionality??

    Thanks,
    Shivani
     
    Garg, Mar 16, 2007
    #1
    1. Advertising

  2. Garg

    marss Guest

    Garg wrote:
    > Hi,
    >
    > I want to make the color of a cell change in my calendar control,
    > whenever mouse is brought over that particular cell. How can I achieve
    > this functionality??
    >
    > Thanks,
    > Shivani


    Here the example:
    cell.Attributes["onmouseover"] =
    "this.style.backgroundColor='#ff0000';";
    cell.Attributes["onmouseout"] =
    "this.style.backgroundColor='#0000ff';";

    Or if existing background color of the cell is set by the style sheet
    or it is inherited from parent element:
    cell.Attributes["onmouseover"] =
    "this.oldBGColor=this.style.backgroundColor;this.style.backgroundColor='#ff0000';";
    cell.Attributes["onmouseout"] =
    "this.style.backgroundColor=this.oldBGColor;";
     
    marss, Mar 19, 2007
    #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. Davisro
    Replies:
    2
    Views:
    1,334
    Jim Corey
    Apr 23, 2004
  2. karunakar
    Replies:
    1
    Views:
    9,706
    Eliyahu Goldin
    Jan 31, 2005
  3. Claus Atzenbeck
    Replies:
    1
    Views:
    1,097
    Claus Atzenbeck
    Nov 26, 2004
  4. Paul
    Replies:
    14
    Views:
    1,696
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    447
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page