Feb 10, 2014, 11:37 AM
[CLOSED] How to GetRowClass will work in v2.x
Hi I am using GetRowClass to change the colors of row on date bases in v1.1 but this not work in v2.x
How could GetRowClass function will work in v2.x
How could GetRowClass function will work in v2.x
<style type="text/css">
.red
{
background: red;
}
.green
{
background: green;
}
.yellow
{
background: yellow;
}
.x-label
{
margin-top: 3px;
float: left;
}
</style>
<script type="text/javascript">
function getRowClass(record) {
var currentDateTime = new Date();
if (record.data.ExpectedDate != null) {
if (record.data.ExpectedDate < currentDateTime) {
return 'green';
}
}
if (record.data.Reminder != null) {
if (record.data.Reminder < currentDateTime) {
return 'yellow';
}
}
if (record.data.DeadLine != null) {
if (record.data.DeadLine < currentDateTime) {
return 'red';
}
}
}
</script>
<ext:Viewport ID="RequestActiviesGridViewPort" runat="server" Layout="Fit">
<Items>
<ext:Panel ID="PanelContent" runat="server" Layout="FitLayout" Region="Center">
<Items>
<ext:GridPanel ID="GridPanel_Requests" runat="server" IDMode="Explicit" FireSelectOnLoad="true">
<View>
<ext:GroupingView>
<GetRowClass Fn="getRowClass" />
</ext:GroupingView>
</View>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
Thanks
Last edited by Daniil; Feb 12, 2014 at 12:02 PM.
Reason: [CLOSED]