Ok, I tried to formatting my message in edit mode but i can't...
So, my grid :
And the example :
<ej:Grid ID="OrdersGrid" runat="server" AllowSorting="true" AllowPaging="True" ClientIDMode="Static">
<ClientSideEvents QueryCellInfo="cellinfo" />
<Columns>
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="100" />
<ej:Column Field="Value" HeaderText="Value" Width="100" TextAlign="Right"/>
</Columns>
</ej:Grid>
<script type="text/javascript">
function cellinfo(args) {
if (args.column.field == "Value" && (args.rowData["CustomerID"] < args.rowData["Value"]))
$(args.cell).css("background-color", "#397218").css("color", "white");
}
</script>
|
It works very well, thank you.
I just used "args.data.somedataname" instead of "args.rowData ["somedataname"]"