This is a migrated thread and some comments may be shown as answers.

[Solved] OnRowDataBound memory leak

0 Answers 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ido
Top achievements
Rank 1
Ido asked on 16 Feb 2012, 12:42 PM
Hi,

I'm using the following JS code for the "OnRowDataBound" event when refreshing grid data through ajax.

function onQuotesRowDataBound(e) {
    var row = e.row;
    var dataItem = e.dataItem;
 
    var index = getCellIndexByName("#QuotesGrid","Quote.Bid");
    var css = "";
    if (dataItem.Quote.ChangeOrientation === 1)
    {
        css = "colorRed";
    }
    else
    {
        css = "colorBlue";
    }
    row.cells[0].className = css;
}

as you can see i'm changing a td's css class name according to a condition I check.
 

The problem is that in IE the "row.cells[0].className = css; " causes memory leak.

Any ideas how to avoid the memory leak anyone?

Thanks
Tags
Grid
Asked by
Ido
Top achievements
Rank 1
Share this question
or