Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
Row templating conditional background color not working with continuous virtualization
posted

I'm using MVC3 / Razor.

I'm using continuous virtualization in my igGrid, and using the examples, I hooked the iggriddatarendered event and use row templating to conditionally change the background color of rows.

This all works well until the grid pulls in additional data as I scroll down- after grabbing more data, the style that was applied for the first chunk of data stops being applied; I'm assuming that the iggriddatarendered event isn't being fired, but can't figure out why.

Any help would be appreciated.

Thanks,

Charlie

 An example of what I'm doing:

@section Body{

<script type="text/javascript">
     $.ig.loader(function(){$("#PFL").live("iggriddatarendered", function(evt, ui){

          var criticalItems = $(".criticalAttention");

          $.each(criticalItems,function(key, value){$(value).parent().addClass("rowCriticalAttention");});

          });

});

</script>

<style type="text/css">
.rowCriticalAttention {background-color: #FF7283;}

</style>

@(Html.Infragistics().Grid<PGMTest.ProjectFund>()

.ID("PFL")

.AutoGenerateColumns(false)

.Caption("Project Funds")

.RowTemplate("<tr><td>{{if parseInt(${Neg}) > 0}}<span class='criticalAttention'>${PI}</span> {{else}} ${PI}{{/if}}" + "</td>"+

....etc...