Cetin,
As another alternative, this is a class you can download which seems to accomplish your goal and more...
http://www.levelextreme.com/wconnect/wc.dll?UniversalThread~?2,54,Forum=5,28,1324or code it out as I did :
1) CREATE A FORM PROPERTY CALLED RECNO (OR SOMETHING) AND SET VALUE TO 0
2) IN THE INIT EVENT OF THE GRID:
this.column1.text1.selectedbackcolor = rgb(255,255,128)
3) IN THE AFTERROWCOLCHANGE EVENT OF THE GRID:
LPARAMETERS nColIndex
this.refresh()
* set selected cell colors
mycolumn="column"+alltrim(str(nColIndex))
WITH this.&mycolumn..text1
.selectedbackcolor = rgb(255,255,128) &&0,255,64)
.backcolor = this.&mycolumn..text1.selectedbackcolor
.selectedforecolor = rgb(0,0,0)
.forecolor = this.&mycolumn..text1.selectedforecolor
ENDWITH
4)IN THE RFRESH METHOD OF THE GRID:
Thisform.recno = recno("TABLENAME")
This.setall("Dynamicbackcolor","iif(recno('TABLENAME')=thisform.vbrecno,rgb(255,255,128),rgb(255,255,255))","Column")
Regards,
Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson
Great advice from a questionable source...