Hi all,
I have a UltraWebGrid on a page and I need to format one column's cell values.
Pseudo Code: If the cell valus is 0<value<100, set the cell's fontcolor to red, else set it to green.here is the code I have tried on the RowDataBound event:
{
UltraGridRow thisRow = UltraWebGrid1.Rows.FromKey("GetPercentageAchieved");
}
else
Also here is the code for the column in question:
<igtbl:UltraGridColumn BaseColumnName="GetPercentageAchieved" Key="GetPercentageAchieved"
IsBound="True" DataType="System.Decimal" Format="N2" Width="25%">
<Header Caption="% Achieved">
<RowLayoutColumnInfo OriginX="3" />
</Header>
<Footer>
</Footer>
</igtbl:UltraGridColumn>
The error I get is on the RowDataBound event which says that i'm getting a null reference.
Therefore, my question is, how do I get the cell value of each row of a particular column on RowDataBound?
Thanks in advance.
try
e.Row.Cells.FromKey("GetPercentageAchieved").Text
or
thanks
if you look closer at the code you will see that my question is about the RowDataBound event.
protected void UltraWebGrid1_DataBound(object sender, EventArgs e) { ....... }the list of properties available to me for the EventArgs is .GetHashCode(), .Equals(), . GetType(), .ToString()
So e.Row..... is not going to work here.
Thanks anyway.