McLoo
  • McLoo
  • Newbie Topic Starter
2013-11-29T08:27:51Z
Hi,

i set the row backcolor in RowDynamicFormatting
oBackColor = vbRed

i want to get the row backcolor in CurCellChange or CellSelectionChange,

but
iGrid.CellBackColor(iGrid.CurRow, 1)
gives me the CELL backcolor which obviously is different from row backcolor (in my case default value -1)


what am i doing wrong?
Igor/10Tec
2013-11-29T10:13:09Z
The purpose of the RowDynamicFormatting event is to overwrite the cell colors defined in CellBackColor/CellForeColor on the fly. CellBackColor is used as a constant store of your color setting, it returns the value you assigned to it - and it should be so.
McLoo
  • McLoo
  • Newbie Topic Starter
2013-11-29T10:50:34Z
i understand that the cellbackcolor constant stays the same.
but how do i get the row back color that was assigned in RowDynamicFormatting?

in my example the line has a red backcolor, but there is no method/property to retrieve the row color value (when selecting the line)
Igor/10Tec
2013-11-29T11:40:58Z
If you assigned the color in RowDynamicFormatting, then you know what color you assigned - use the same algorithm.

Sorry, but this is the nature of the cell properties. Such properties as CellBackCOlor should store and return the value you assigned to it.
Oliver
2013-11-29T12:13:07Z
I think this is a misunderstanding.

McLoo, you assign the oBackColor in the RowDynamicFormatting-Event. That pracitcally overwrites the CellBackColor of the entire row. It ist never stored as a "row-property" in the first place.
If you change the color of an idiviual cell later, that cells color changes away from that "RowColor" to that.

If you need to remember this color as a kind of attribute or state, simply add another (invisible) column and store that Value there.
(My reasonably complex real world use of the iGrid currently has about 12 visible columns and about as many invisible ones to carry additional information)

Regards,
Oliver
McLoo
  • McLoo
  • Newbie Topic Starter
2013-11-29T14:58:11Z
ah, the missing information "no row color property" helped me in understanding, how that dynamic formatting works.

thanks for the invisible row hints.