I originally had a datagrid bound to a dataset. After loading the dataset, I would loop through it and make changes to the datagrid background colors based on values in the dataset. The code was something like:
if myDataset.myDataTable(i).STATUS = "C" then
myDatagrid.items(i).cells(1).BackColor = Color.Red
end if
That worked fine. I now have to added sorting capability. I've bound the datagrid to a dataview so that I can set the dataview.sort property. The problem now is that when I do a datagrid.databind, I loose the formatting of the datagrid. It does do the sorting though.
Any ideas on how I can do both the sorting and make changes to individual cell appearances?
if myDataset.myDataTable(i).STATUS = "C" then
myDatagrid.items(i).cells(1).BackColor = Color.Red
end if
That worked fine. I now have to added sorting capability. I've bound the datagrid to a dataview so that I can set the dataview.sort property. The problem now is that when I do a datagrid.databind, I loose the formatting of the datagrid. It does do the sorting though.
Any ideas on how I can do both the sorting and make changes to individual cell appearances?