Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Cell modification in javascript

Last post 07-01-2009, 9:58 AM by LeHobbit. 2 replies.
Sort Posts: Previous Next
  •  07-01-2009, 7:42 AM 186369

    Cell modification in javascript

    I want to set the background-color of a cell in javascript using the following code when the OnCellUpdatedClientFunction is called :

    function onRatingCellUpdated(cell) {
    this
    .setActiveCell(this.getActiveRow(), this.getActiveColumn());
    this.getActiveCell().style.backgroundColor = 'yellow';
    alert('test');

    }

    The problem is that the color is modified before the call to the alert function (I can see it in the grid) but immediately reseted to the previous style at the end of the onRatingCellUpdated function. Is there a way to keep the style applied ?

     

     
  •  07-01-2009, 9:42 AM 186407 in reply to 186369

    Re: Cell modification in javascript

    Hi,

    Please change your code to (to check if it works fine now):

    function onRatingCellUpdated(cell) {
    this.setActiveCell(this.getActiveRow(), this.getActiveColumn());
    this.getActiveCell().orgBgColor = "yellow";

    alert('test');
    }

     

    Thank you.


    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
  •  07-01-2009, 9:58 AM 186411 in reply to 186407

    Re: Cell modification in javascript

    Thank you so much. It's working perfectly.
     
View as RSS news feed in XML