Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh the column.dynamicbackcolor
Message
From
21/10/2000 00:17:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Refresh the column.dynamicbackcolor
Miscellaneous
Thread ID:
00432413
Message ID:
00432413
Views:
54
Hi all,
I am using VFP6. I have a grid which bound to a table. In the grid refresh method, I have following code:
<<<<<<<<<<<<<<<<<<
m.currentrecno=recno('sales_tx')
m.dycolor1="iif(recno()="+alltrim(str(m.currentrecno))+",rgb(0,255,0),rgb(192,192,192))"
m.dycolor2="iif(recno()="+alltrim(str(m.currentrecno))+",rgb(0,200,0),rgb(150,150,150))"
m.colcnt=this.columncount
for m.temp = 1 to m.colcnt
this.columns(m.temp).dynamicbackcolor=iif(mod(m.temp,2)=1,m.dycolor1,m.dycolor2)
endfor
>>>>>>>>>>>>>>>>>>>>
so the back color of current record row is different from the other.

I have one command btn, it's click event have following code:
<<<<<<<<<<<<<<<<<<<<<
APPEND BLANK IN sales_tx
REPLACE sales_tx.invno WITH sales_m.invno IN sales_tx
thisform.grid_tx.refresh
>>>>>>>>>>>>>>>>>>>>

The problem is when I click the btn to append a record. The grid can't always refresh to show I have just add a record. I need to click on the grid to refresh what I want (eg. I have click 10 time, but only 3 color line is shown on grid, I have to click on the grid to show 10 color line)

Can anyone understand my problem and give me some hints?

-Jasper.
oh, what is the fastest way to write good program?
Next
Reply
Map
View

Click here to load this message in the networking platform