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
155
changing the color of row based on the cell value
posted

how to change the color of the row based the column value in the WebHierarchicalDataGrid

<ig:WebHierarchicalDataGrid runat="server" ID="wdgEmployees" AutoGenerateColumns="false"
DataMember="DVParent1" DataSourceID="WebHierarchicalDataSource1"
Width="100%" ondatabinding="wdgEmployees_DataBinding"
oninit="wdgEmployees_Init" oninitializerow="wdgEmployees_InitializeRow"
onrowislanddatabinding="wdgEmployees_RowIslandDataBinding" >
<Columns>
<ig:TemplateDataField Key="CSA_Serial Number">
<HeaderTemplate>
Serial Number
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT.SERIALNUMBER")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM1">
<HeaderTemplate>
Schduled At Hours
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "SchduledAtHours")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM3">
<HeaderTemplate>
GPS
</HeaderTemplate>
<ItemTemplate>
<div>
(
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_DFFleetSummary_LAT")%>,
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_DFFleetSummary_LON")%>)
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM4">
<HeaderTemplate>
EnrollNumber
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "CSA.ENROLLNUM")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM5">
<HeaderTemplate>
Warranty PSP
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "PSP")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM6" Width="120">
<HeaderTemplate>
Oil Level
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_refOil")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
</Columns>
<Behaviors>
<ig:Selection RowSelectType="Single" CellClickAction="Row">
</ig:Selection>
<ig:Sorting EnableCellMerging="false" SortingMode="Multi" />
</Behaviors>
</ig:WebHierarchicalDataGrid>
</Template>
</ig:ContentTabItem>
<ig:ContentTabItem runat="server" Text="In Progress">
<Template>
<ig:WebHierarchicalDataGrid runat="server" ID="WebHierarchicalDataGrid1" AutoGenerateColumns="false"
DataMember="DVParent2" DataSourceID="WebHierarchicalDataSource1" Width="100%">
<Columns>
<ig:TemplateDataField Key="CSA_Serial Number">
<HeaderTemplate>
Serial Number
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT.SERIALNUMBER")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM1">
<HeaderTemplate>
Schduled At Hours
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "SchduledAtHours")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM3">
<HeaderTemplate>
GPS
</HeaderTemplate>
<ItemTemplate>
<div>
(
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_DFFleetSummary_LAT")%>,
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_DFFleetSummary_LON")%>)
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM4">
<HeaderTemplate>
EnrollNumber
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "CSA.ENROLLNUM")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM5">
<HeaderTemplate>
Warranty PSP
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "PSP")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
<ig:TemplateDataField Key="CSA_ENROLLNUM6" Width="120">
<HeaderTemplate>
Oil Level
</HeaderTemplate>
<ItemTemplate>
<div>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "EQUIPMENT_refOil")%>
</div>
</ItemTemplate>
</ig:TemplateDataField>
</Columns>
<Behaviors>
<ig:Selection RowSelectType="Single" CellClickAction="Row">
</ig:Selection>
<ig:Sorting EnableCellMerging="false" SortingMode="Multi" />
</Behaviors>
</ig:WebHierarchicalDataGrid>

C# code:

 WebHierarchicalDataSource1.DataViews[0].DataSource = ThePMContractHeaderOpenListL;

i want to change the color to red based on the SchduledAtHours

plz help me 

thanks,

venkatesh.