Click here to Skip to main content
15,891,730 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridpanel created in code behind and I want to change the row background color based on a specific condition on a column in the gridpanel but I cant find a way to add a gridview with getRowClass function in c#:

The view tag that is added to a gridpanel and this is the block of code that I want to do it in code behind (c#) but cant finding a solution
ASP.NET
<View>
<ext:GridView ID="GridView1"  runat="server">
<GetRowClass Fn="getRowClass"/>                  
</ext:GridView>
</View>



the javascript function "getRowClass":
JavaScript
var getRowClass = function (record, index, rowParams, store) {
                   if(record.get("TaskCode")=="1378294")
                   return "my-highlighted-row";
           };





any help?
Posted
Updated 26-Feb-15 20:58pm
v2

1 solution

I solved using the same method, the javascript function read the data row by row and then i can color the rows.
thank u
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900