Hi
I have a grid which is bound to datasource. i have added a unbound column with checkbox style.I am background-colouring rows in the grid depending on the data conditions,in the InitliazeRow Event. I see that the background of the checkbox style column is also coloured.I dont want this to happen.ie this checkbox style unbound column should not have nay background colour.How to make this happen ? Thanks in advance
-Anusha
HI anusha,
give a try at these cond and if not plz go ahead with Matt suggestion,
A column added in design time and binded with a datasource in runtime ,then all the columns created at design time will be cleared .
If so try this like
1. assing the datasource
2.in intialize layout ,
e.layout.bands[0].columns.add("newcolumn")
Now definite that shud be there in the coll collection of e.row in initialize event .
Anusha,
You should be seeing that column in the InitializeRow event, since that will fire after InitializeLayout. If you're certain that the column has been added and that it's not showing up in e.Row.Cells[key/index], then you should probably submit an issue to Developer Support along with a small sample so that they can take a look at it.
-Matt
Hi Matt
I thought of resetting the backcolur of the unbound column's cell in InitializeRow,but I dont see that unbound cell in e.Row.I can see the columns from the datasource but not unbound column(BTW,I am adding the column in InitlaizeLayout)...where else should this be done ?
Thanks
Anusha
How are you setting the rows' or cells' appearances? If you're setting the entire appearance on the row, then each of the cells are going to pick this up. I'm not sure about the order of precedence offhand, but if setting the BackColor of the unbound column directly does not override the appearance set on the row, then you could certainly set the appearance of each cell of the unbound column in the InitializeRow event. If you choose to do the latter, I'd recommend creating a single Appearance object and re-use it for each of these cells since it would be inefficient to create a new object each time InitializeRow fires.