Hi Doron,
>The problem is when I tried to change the column color let say
>to gray such as: .Columns[5].BackColor=RGB(192,192,192)
>From some the gray color appears only at the bottom where
>there are no more records within the grid.
>Is there any work around this problem ?
What you are seeing is correct, The DynamicBackColor "overrides" in a way over the BackColor setting. The BackColor is showing up in the unused rows besace DynamicBC never touches them. I suggest you modify your DynamicBC to include an "AND"ed arguement to do the work of your BackColor = ect.
Also, instead of a FOR loop to set the dynamicBC, you can use SetAll():
Thisform.Grid1.SetAll('DynamicBackColor', 'IIF(blah)', 'Column')
Does this clear some things up?