[Apologies as I am posting a WinFrom C# quetion in ASP.NET as the WinForm link is down]
I am trying to add RED color to a column if the vaule is negative. Its a currency field. Even though the code gets compiled and executed fine it simply doesn't have any effect on UI. Could you help me understand whats worng with the code..
public DataView M_Grid_DataSource
{
get { return m_grid.M_DataSource as DataView; }
set
{
m_grid.M_DataSource - value;
int ind = m_grid.NameToColIndex("FieldName");
m_grid.Sortcolumn(ind);
GridStyleInfo style = new GridStyleInfo();
style.CellType = "Currency";
style.CurrencyEdit.CurrencyNegativePattern = 0;
style.CurrencyEdit.NegativeColor = Color.Red
GridBoundColumnsCollection collection = m_grid.GridBoundColumns;
GridBoundColumn n = collection[ind];
n.StyleInfo = style;
m_grid.Show();
}
}
Thanks
Vaibhav