Hello!
Taking a look at my code I guess you are right. I'm copying code from another project to a new one in which the data format from the datatable is different plus was in XAML. So, something that I don't see nor understand could be wrong... With that being said, let me start again and rephrase my question to make it simple as possible.
Lets say that I have a dataTable set to the ItemsSource in which it has 3 fields (Selection (Boolean), Date (DateTime), myImportantValue (String)). The data is readonly and can't be changed while being displayed.
What I would like to do is to be able to change the row forecolor to Red when myImportantValue is not empty. All other rows must not change (should be default forecolor which is black). Actually, myImportantValue will be only in one row (that is how the Stored Procedure works!).
I created the myObject like this (VB.Net, No XAML):
Dim myObject as new myC1DataGrid
'Note: myC1DataGrid Inherits C1.WPF.C1DataGrid.C1DataGrid. All that has is many Public Property.
With myObject
.AutoGenerateColumns = True
.AllowDelete = False
.AllowColumnMove = False
.AllowGroupBy = False
.AllowHierarchicalData = False
.AllowHorizontalColumnSizing = False
.AllowHorizontalSplit = False
.AllowHorizontalSplitSizing = False
.AllowVerticalColumnSizing = False
.AllowVerticalSplit = False
.AllowVerticalSplitSizing = False
.GroupByVisibility = Visibility.Collapsed
.HeaderVisibility = Visibility.Visible
.NewRowPlacement = C1.WPF.C1DataGrid.NewRowPlacement.None
.RowHeaderVisibility = Visibility.Collapsed
.IsTabStop = False
.AllowSort = True
.MaxHeight = 550
.MaxHeight = 550
.Margin = New Thickness(3)
.ItemsSource = myDataWithThreeFields ' Works fine without next line.
'.Template = myCustomControlTemplate ' Here is where I guess that the Custom Control Template should be assign. Right?
End with
Return myObject
Again:
What I would like to do is to be able to change the row forecolor to Red when myImportantValue is not empty. All other rows must not change (should be default forecolor which is black). Actually, myImportantValue will be Only in one row.
Note: All special stuff was left out to make this example simple.
Please, no XAML.
Thank you in advance!