I am entering data through a datatable. That would need a criterion depending on the source was changed as shown below. It also follows an example of how I am entering data. How can I do this?
Dim dt As New DataTable("dtMov")dt.Columns.Add("Name")dt.Columns.Add("Value")While not rs.eof
Dim row As DataRow = dt.NewRow()row(0) = RS("name").Valueif RS("value").Value >= 0 then row(1) = RS("value").Value 'PAINT OF BLUEelse row(1) = RS("value").Value 'PAINT OF REDend ifdt.Rows.Add(row)RS.MoveNext()
End WhileMe.appGrid.DataSource = dt
Thank you very much. It was exactly that. I need help on the following topic and still can not help, would you help me: http://forums.infragistics.com/forums/t/38839.aspx
Hi,
I'm not sure I understand what you are asking. Are you asking how to change the forecolor of the cells based on the Value in those cells?
If you have your columns set up at design-time, then the easiest way to do this would be to use a ValueBasedAppearance on the column.
At run-time, the easiest way is to use the InitializeRow event and apply an appearance to the cell. There is more information about the most efficient way to do this here: WinGrid Performance Guide