GRIDµÄʹÓü¼ÇÉ
1.ÈçºÎÔÚGRIDÀï¿ØÖƻسµÊ¼þ
ÔÚVFPÀGRIDµÄĬÈϿؼþ¶¼ÊÇTEXTBOX£¬ÐγÉÁËÒ»¸ö±í¸ñ£¬µ«ÊÇÔÚÕâ¸ö¶þά±íÀï½øÐвÙ×÷ʱ£¬Ã¿´Î°´»Ø³µ¶¼ÊÇÍùºóÒ»¸öµ¥Ôª¸ñÌøת£¬µ±µ½×îºóÒ»ÁÐʱ£¬Ôò¼ÌÐøÌøµ½µÚÒ»ÁУ¬½ø¶øÑ»·£¬²Ù×÷ºÜ²»·½±ã¡£
ÏÂÃæ˵Ã÷ÈçºÎÔÚGRIDÀïµÄÒ»¸öÁÐÀï°´»Ø³µÊ¹¼Ç¼Á¬ÐøÍùÏÂÌøת£¨»ò¿ÉÒÔÖ´ÐÐÆäËûµÄ²Ù×÷£©£¬µ±Ìøתµ½×îºóÒ»ÐÐʱִÐÐÁíÒ»¸ö²Ù×÷¡£ £±¡¢¶ÔGRIDËùÔÚµÄ±íµ¥ÐÂÔöÊôÐÔ£º cur_recn ¼Ç¼µ±Ç°¼Ç¼ºÅ cur_recc ¼Ç¼×î´ó¼Ç¼ºÅ
2¡¢ÔÚ±íµ¥³õʼ»¯£¬»ò¸øGRIDÒÔÊý¾ÝԴʱ£¬¾ÍÏȼÆËã³ö¸Ã±íµÄ×î´óµÄ¼Ç¼Êý£¬ÈçÏ£º thisform.cur_recc=recc()
ΪÁËÒ»´ÎµÃµ½µ±Ç°GRIDÀïµÄ±íµÄ¼Ç¼×ÜÊý 3¡¢ÔÚGRIDµÄAfterRowColChangeʼþÀïд£º thisform.cur_recn=recn()
ΪÁ˵õ½µ±Ç°µÄGRIDÀïµÄ±íµÄ¼Ç¼ºÅ
4¡¢ÔÚGRIDÀïµÄijÁеÄTEXT1µÄKEYPRESSʼþÀ if nKeyCode = 13 && µ±°´¼üΪ»Ø³µÊ± if thisform.cur_recn>=thisform.cur_recc
**-- µ±µ±Ç°¼Ç¼´óÓÚµÈÓÚ×î´ó¼Ç¼ʱ£¬¼´¼Ç¼Òѵ½×îºóÒ»¸öʱ thisform.command1.setfocus
**-- ʹ±íµ¥ÉϵÄÒ»¸öÃüÁŦ¾Û½¹£¬Ò²¼´¿ÉÒÔÌø³ö¸ÃGRID£¬
**-- ¶øÕý³£µÄ²Ù×÷ºÜÄÑ´ÓGRIDÀïÌø³ö£¬ÔÚÕâÀï¾Í¿ÉÒÔʹÔڼǼµ½×îºóʱ½¹µãÌø³öÀ´ else
thisform.cur_recn=recn() && µ±¼Ç¼»¹Ã»µ½Î²Ê±£¬Ôò... nodefault && ²»×öÈκÎÏìÓ¦
keyboard \Ä£Äâ¼üÅÌϼýÍ·£¬Ê¹¼Ç¼ָÕëÏÂÒÆÒ»¸ö endif endif
ÒÔÉÏËù˵µÄ£¬Ö»Òª°´¼üÅÌÉϵÄÉÏϼýÍ·¼´¿ÉÇáÒ××öµ½ÔÚGRIDÖÐÒƶ¯Ö¸Õ룬ûÓÐÌ«´óµÄÒâÒå¡£ 2.ÈçºÎʵÏÖÊäÍêÊý¾Ýºó°´»Ø³µ¼ü£¬Ê¹±í¸ñÖеĽ¹µã×Ô¶¯Ìøµ½ÏÂÒ»ÐÐ ÔÚÄãÒªÅжÏת»»µÄGRIDµÄ×îºóÒ»ÁеÄTEXT1µÄkeypress: IF nKeyCode=13
SELECT Äã°ó¶¨±íÃû nRec=RECNO() SKIP IF EOF()
APPEND BLANK &&ÔÚ±íβ¼ÓÒ»¿Õ¼Ç¼ SKIP &&¼Ç¼ָÕëµ½EOF() Thisform.grid1.refresh
Thisform.grid1.column1.text1.SetFocus &&µ½×îÇ°Ãæ ELSE
GO nRec &&ͬһÐУ¬²»Òª´Ë¾ÍÌøÏÂÒ»¸ñ
Thisform.grid1.refresh
Thisform.grid1.column1.text1.SetFocus ENDIF ENDIF
ÒÔÉÏ´úÂëδ¾¹ýÊÔÑ飬µÈ´ýing
Thisform.grid1.recordsuore=NullÊÇʲôÒâ˼£¿
Thisform.grid1.recordsuore=Null ÓëThisform.grid1.recordsuore=''ÊDz»ÊÇÒ»ÑùµÄ£¿ nullÊDz»µÈÓÚ'',µ«ÔÚÉÏÃæÀý×ÓÖеĽá¹ûÊÇÒ»ÑùµÄ¡£
NULLÖµ²»ÊÇ¿ÕÖµ£¬Ò²²»ÊÇÁãÖµ£¬¶øÊÇδ֪µÄ¡¢²»¿ÉÔ¤²âµÄÖµ¡£ÔÚÊý¾Ý¿âÖУ¬Ò»µ©½«Ä³×Ö¶ÎÉèΪNot Null ÔòÓû§±ØÐë¼ÈëÊý¾Ý£¬·ñÔò²»ÔÊÐíÊý¾Ý¿â¸üС£
3.ÎÒÔõÑù²ÅÄÜ°ÑÍø¸ñÖеÄÎı¾¿Ø¼þÌ滻ΪÆäËü¿Ø¼þ?£¨¿É²ÎÕÕÊշѹÜÀíϵͳ£© Ê×ÏÈ£¬ÏÈ°ÑÔÀ´µÄÎı¾¿ò¿Ø¼þɾ³ý¡£
1)ÔÚÄúÒªÐ޸ĵÄÍø¸ñÉÏ°´ÏÂÊó±êÓÒ¼ü£¬Ñ¡Ôñµ¯³ö²Ëµ¥Öеġ°ÊôÐÔ....¡±
2)ÔÚµ¯³öµÄÊôÐÔ¶Ô»°¿ò¶¥¶ËµÄÁоٿòÖÐÑ¡ÔñÒªÌæ»»Îı¾¿òµÄcolumnϵÄtext1¡£ 3)ÔÚÍø¸ñÉÏ°´Ò»ÏÂÊó±ê×ó¼ü¡£
4)°´Ï¼üÅÌÉϵÄDELETE°´¼ü£¬É¾³ýText1¿Ø¼þ(Íø¸ñÉϵÄab1½«»áÏûʧ)¡£ Æä´Î£¬ÔÚÍø¸ñÉÏÌíÖÿؼþ¡£
1)ÔÚÄúÒªÐ޸ĵÄÍø¸ñÉÏ°´ÏÂÊó±êÓÒ¼ü£¬Ñ¡Ôñµ¯³ö²Ëµ¥Öеġ°±à¼....¡± 2)°´Ò»ÏÂ±íµ¥¿Ø¼þ¹¤¾ßÀ¸ÉÏÄúÒª¼Óµ½Íø¸ñÉϵĿؼþ¡£
3)ÔÚÄúÒªÌíÖÿؼþµÄcolumnÉÏ°´ÏÂÊó±ê×ó¼ü£¬²¢·ÅÖÿؼþ¡£ ÓÃGridÄ£ÄâBrowse´°¿Ú
¿ÉÒÔ½«Grid½áºÏÔÚForm¶ÔÏóÖУ¬Ä£Äâ³ÉÒ»¸öBrowseÃüÁî´°¿Ú£¬µ±×ÔÓɵ÷ÕûForm´óСʱ£¬Grid¶ÔÏóÒ²»á×Ô¶¯µ÷Õû´óС¡£ÊµÏÖ·½·¨ÈçÏ£º
1£®Ê×ÏÈÉ趨һ¸öForm¶ÔÏ󣬸öÔÏó±ØÐë±£ÁôÆäBorderStyleÊôÐÔΪ¡°3£¿Éµ÷±ß¿ò¡±£¬¼´ÉèΪ¿É×ÔÓɵ÷Õû´óСµÄ±ßÏßÊôÐÔ£»Í¬Ê±É趨ResizeʼþÈçÏ£º Thisform.Grid1.Width=this.Width Thisform.Grid1.Height=this.Height
2£®Éè¼ÆÒ»¸öGrid¶ÔÏóÓÚForm¶ÔÏóÖУ¬²¢É趨ÆäÊôÐÔÈçÏ£º RecordSourceΪĿǰ¡°Êý¾Ý»·¾³¡±ÖÐËùÉ趨µÄ¹¤×÷Çø±ðÃû£» TopÓëLeft¾ùÉèΪ0£¬±íʾ¸Ã¶ÔÏó×óÉ϶Ë×ø±êΪ£¨0£¬0£©£» WidthµÄÖµÉèΪThisform.Width£» HeightµÄÖµÉèΪThisform.Height¡£
ÕâÑù£¬ÒѾÉ趨ºÃµÄGrid¶ÔÏó±ã¿ÉÒÔºÍBrowse´°¿ÚÏà¹ØÁª£¬µ±¶ÔForm¶ÔÏó½øÐдóСµ÷Õûʱ£¬Grid¶ÔÏóµÄ¸ß¶ÈÓë¿í¶È¾Í¿ÉÒÔËæÖ®µ÷ÕûÁË¡£
4.±í¸ñGIRDµÄÊý¾ÝÔ´±íɾ³ýÊý¾Ý»ò±ä¶¯ºó,±í¸ñ»áÏÔʾ¿Õ°×£¿ thisform.grid1.RecordSource = null
SELECT yea,mon,jcgz1,gwgz1,ren1,jcgz2,gwgz2,ren2,dqgz,dqren,ntgz,ntren,txgz,txren; FROM gzhz WHERE danwei = this.value AND yea = thisform.cboyea.Value ; INTO dbf dwgz ORDER BY mon thisform.grid1.RecordSource = 'dwgz' Æäʵ¾ÍÊÇ:
ÏÈhsiform.grid1.recordsource = null ¾¹ý±í²Ù×÷£¨É¾³ý¡¢±ä¶¯µÈ£©
ºóhisform.grid1.recordsource ='dbfname'
5.¹ØÓÚGridµÄ°ó¶¨Êý¾ÝÔ´ÎÊÌ⣨ÓÃÁÙʱ±í°ó¶¨£© thisform.grid1.recordsource=\
SELECT ѧºÅ£¬ÐÕÃû FROM tblStudent INTO CURSOR temporary thisform.grid1.recordsource=\ thisform.grid1.refresh() ¾ßÌå½âÊÍÈçÏ£º
thisform.grid1.recordsource=\ÕâÒ»ÐеÄÄ¿µÄÊÇÈÃgrid1ÔÚÕû¸ö
SELECT ѧºÅ£¬ÐÕÃû FROM tblStudent INTO CURSOR temporary
Æڼ䲻Ëætemporary±íµÄ±ä»¯¶ø±ä»¯,INTO CURSOR temporaryʵ¼ÊÉÏÓжà¸ö¶¯×÷, ÏÈÇå³ýÔÁÙʱ±ítemporary,ÔÙÉú³ÉеÄtemporary±í,
thisform.grid1.recordsource=\ÕâÐеÄÄ¿µÄÊÇÈÃGRID1ÔÚÈ«¹ý³ÌÖкÍÁÙʱ±ítemporary¶Ï¿ª,²»ÊÜËüµÄÓ°Ïì.
µ±È«²¿²Ù×÷ÍêºóÔÙÓÃ
thisform.grid1.recordsource=\Á¬½ÓÉÏÈ¥,×îºÃÔÚÕâ¾äÇ°¼ÓÉÏÒ»¾ä, select temporary go top
ÕâÑùÈç¹ûtemporaryÓжàÌõ¼Ç¼µÄ»°²»»á³öÏÖÖ¸ÕëÔÚĩβ¶ø¿´²»µ½µÚÒ»Ìõ¼Ç¼µÄÇé¿ö(²»ºÃ¿´),
thisform.grid1.refresh()Õâ¾ä»ù±¾ÉÏ¿ÉÒÔ²»ÒªµÄ,ÔÚ´ó¶àÊýÇé¿öϲ»»á³ö´í,Ö»ÓÐÔÚ²éѯºó½ô¸úÆäËü¶Ôgrid1Êý¾Ý¼¯µ÷ÓÃÖ¸ÁîµÄ»á³ö´í.
6.grid¿Ø¼þµÄʹÓü¼ÇÉ£¨Ó¦ÓÃsetall()·½·¨Í³Ò»ÉèÖã© (1)½ûÖ¹Óû§ÓÃÊó±êÈ¥µ÷Õû¸÷¸öcolumnµÄλÖÃ˳Ðò ÔÚgridµÄinitʼþ³ÌÐòÖÐÊäÈëÒÔÏ´úÂ룺 this.setall(\
(2)½ûÖ¹Óû§ÓÃÊó±êÈ¥µ÷Õû¸÷¸öcolumnµÄ¿í¶È ÔÚgridµÄinitʼþ³ÌÐòÖÐÊäÈëÒÔÏ´úÂ룺 this.setall(\
(3)ʹgridÖи÷¸öcolumnµÄ±êÌâÎÄ×Ö×Ô¶¯¾ÓÖÐ ÔÚgridµÄinitʼþ³ÌÐòÖÐÊäÈëÒÔÏ´úÂ룺 this.setall(\ (4)½¨Á¢Çóƽ¾ùÀ¸
¼ÙÉèÒ»¸ö´æ·ÅÁ˳ɼ¨Êý¾Ý±í£¨°üÀ¨£ºÐÕÃû¡¢ÓïÎÄ¡¢Êýѧ¡¢ÕþÖÎ×ֶΣ©£¬ÓûÔÚgridÖÐÔö¼ÓÒ»¸ö¡°Æ½¾ù·Ö¡±Ö±À¸£¬Ö»Ð轫gridµÄcolumncountÊôÐÔ¼Ó1£¬È»ºó½«¡°Æ½¾ù·Ö¡±À¸µÄcontrolsourceÊôÐÔÉèΪÈçÏ£º
controlsource=(ÓïÎÄ+Êýѧ+ÕþÖÎ)/3 (5)¸ù¾ÝÓû§Ñ¡¶¨µÄcolumn½øÐÐÅÅÐò
ÓÐʱϣÍûµ¥»÷columnµÄ±êÌ⣬¾ÍÒÔ´ËcolumnµÄ×ֶνøÐÐÅÅÐòÏÔʾ¼Ç¼¡£ÎÒÃÇ¿ÉÒÔÔÚ¸÷¸öcolumnµÄheader¶ÔÏóµÄclickʼþÖУ¬½«Êý¾Ý»·¾³ÖеÄcursor¶ÔÏóµÄorderÊôÐÔÉ趨³É¸ù¾ÝÕâ¸öcolumnµÄ×ֶν¨Á¢µÄË÷ÒýÃû³Æ£¬È»ºóÔÙµ÷ÓÃgridµÄrefresh·½·¨¼´¿É¡£ÀýÈ磺 thisform.dataenvironmnet.cursor1.order=\ÐÕÃû\ thisform.grid1.refresh
(6) Grid¶ÔÏóÖн¹µãÐеĶ¯Ì¬ÏÔʾ
Grid¶ÔÏóÖе±Êý¾Ý¼Ç¼Òƶ¯Ê±£¬ÓÃÑÕÉ«¶¯Ì¬±ä»¯ÏÔʾÏà¶Ô¹â±êËùÔڼǼµÄλÖ㬿ÉÒÔÔÚGrid¶ÔÏóµÄafterRowColChangeʼþ¹ý³ÌÖмÓÈëÈçÏÂÄÚÈÝ£º
this.setall(¡°dynamicbackcolor¡±,¡°iif(this.activerow=recno(),rgb(0,0,255),rgb(255,255,255))¡±,¡°column¡±)¡£
(7)ÔÚÍø¸ñÖн»ÌæÏÔʾÑÕÉ«
¼Ç¼ºÅÓÐÐòÅÅÁÐʱ£¬¿ÉÒÔÔÚÍø¸ñµÄÁÐÖн»ÌæÏÔʾ°×É«ºÍ»ÒÉ«µÄ¼Ç¼£¬´úÂëÈçÏ£º THIS.SETALL(\50,253))\ÉèÖøôÐеIJ»Í¬±³¾°ÑÕÉ«:¡£ (8) ·ûºÏÌõ¼þµÄ¼Ç¼ÏÔʾÑÕÉ«
½øÐвéѯʱ£¬ÏëÔÚÍø¸ñÖж¯Ì¬µØÏÔʾ·ûºÏÌõ¼þµÄ¼Ç¼µÄÑÕÉ«£¬¿ÉÒÔ³ä·ÖÀûÓÃDynamicBackColorºÍDynamicForeColorÌØÐÔ¡£
ÀýÈ磺ÔÚ¡¶Õ¬»ùµØ¹ÜÀíϵͳ¡·ÖУ¬Ê¹±»×¢¡¢³·ÏúµÄ¼Ç¼³ÊÏÖºìÉ«£¬¿ÉÔÚgrid1µÄinitʼþºÍafterrowcolchangeÖÐÌí¼ÓÏÂÁдúÂ룺£¨×¢Ò⣺¼Ó²»¼Ó,\¶¼¿ÉÒÔ£©
this.SetAll(\ÊÇ·ñ±»×¢£¨³·£©Ïú='ÊÇ',rgb(255,0,0),rgb(0,0,0))\ʹ±»×¢³·ÏúµÄ¼Ç¼ÏÔºìÉ« £¨9£©ÉèÖöàÖÖÑÕÉ«£¨ÎÞ¹æÂÉÐÔ£©
ÀýÈ磺ÔÚ¡¶Õ¬»ùµØ¹ÜÀíϵͳ¡·ÖУ¬Ê¹±»×¢¡¢³·ÏúµÄ¼Ç¼³ÊÏÖºìÉ«£¬¿ÉÔÚgrid1µÄinitʼþºÍafterrowcolchangeÖÐÌí¼ÓÏÂÁдúÂ룺£¨×¢Ò⣺¼Ó²»¼Ó,\¶¼¿ÉÒÔ£©
this.SetAll(\ÊÇ·ñ±»×¢£¨³·£©Ïú='ÊÇ',rgb(255,0,0),rgb(0,0,0))\ʹ±»×¢³·ÏúµÄ¼Ç¼ÏÔºìÉ«
Ö÷ÒªÊÇÕë¶ÔÒ»¸ö±íGRIDÀµ±¼Ç¼ºÜ¶àʱ£¬¶øÇÒijЩ¼Ç¼¾ßÓÐÌض¨µÄÊôÐÔʱ£¬ÎÒÃÇÐèÒªÉèÖÃÑÕÉ«À´Çø·ÖÕâЩÊý¾Ý£¬ÈçÏ´úÂë¿ÉÒÔÔÚˢлò³õʼ»¯±íµ¥Ê±£¬ÉèÖÃÆäÊôÐÔ¡£
thisform.Grid1.SetAll(\b(192,192,192)),rgb(255,0,0)),rgb(255,255,255))\
ÈçÉÏ´úÂë¿ÉÒÔ˵Ã÷£¬Èç¹ûij¼Ç¼ÖÐÓÐÒ»¸ö×Ö¶Îtype£¬ÄÇô¸ù¾ÝÕâ¸ö×ֶεÄÊý¾ÝÖµ£¬¿ÉÒÔÏÔʾ²»Í¬ÑÕÉ«£¬¿ÉÒÔת»»³ÉÈçϹ«Ê½£º
iif(Ìõ¼þ1,iif(Ìõ¼þ2,iif(Ìõ¼þ3,iif(Ìõ¼þ4,iif(Ìõ¼þ5,[...iif(Ìõ¼þN,ÑÕÉ«N,ÑÕÉ«n-1)...,]ÑÕÉ«5,ÑÕÉ«4),ÑÕÉ«3),ÑÕÉ«2),ÑÕÉ«1),ÆäËûÑÕÉ«)
£¨10£©ÓÃSetAll·½·¨¡£ÀýÈ磬Äã¾ö¶¨ÎªÈ«²¿Íø¸ñÖеıêÌâÉèÖÃ9ºÅËÎÌå¡£½«ÒÔÏ´úÂë·ÅÈëÍø¸ñµÄInitʼþ£º THIS.SETALL(\(11)ÆäËû£¨ÔÚ¡¶ÍÁµØµÖѺ¹ÜÀíϵͳ¡·ÖÐʹÓõģ©
this.setall(\¸Ä±ägridÁÐÍ·µÄÇ°¾°É«
this.setall(\¸Ä±ägridÁÐÍ·µÄ±³¾°É«
this.setall(\ &&ʹgridÖи÷¸öcolumnµÄ±êÌâÎÄ×Ö×Ô¶¯¾ÓÖÐ this.setall(\ &&ʹgridÖи÷¸öcolumnÄÚµÄÎÄ×Ö×Ô¶¯¾ÓÖÐ this.setall(\½ûÖ¹Óû§ÓÃÊó±êÈ¥µ÷Õû¸÷¸öcolumnµÄ¿í¶È
this.setall(\ &&½ûÖ¹Óû§ÓÃÊó±êÈ¥µ÷Õû¸÷¸öcolumnµÄλÖÃ˳Ðò 7..Ôõô²ÅÄÜÈÃgridµÄ¹â±ê×Ô¶¯Òƶ¯µ½Òª±à¼¼Ç¼ÉÏ£¿ ÈçgridÏÔʾµÄ±íΪaa aa¼Ç¼ÓУº
ѧºÅ ÐÕÃû 001 ÍõÒ» 002 Íõ¶þ 003 ÍõÈý
¡£¡£¡£¡£¡£¡£
240 Íõ¶¯ ¡£¡£¡£¡£¡£¡£
ÔÚ±íµ¥textboxÖÐÊäÈë\ºó£¬Èùâ±ê×Ô¶¯µ½Ñ§ºÅΪ¡°240¡±µÄ¼Ç¼£¨ÇÒgridÄܹ»×Ô¶¯¹ö¶¯µ½´Ë¼Ç¼ÏÔʾ-------£©
ÔÚcmdGoµÄclickʼþÖУ¬ÓÃÒÔÏ´úÂ룺 sele aa
loca ѧºÅ=thisform.textbox.value thisform.grid.setfocus
8¡¢ÎÒÔõÑù²ÅÄÜ°ÑÍø¸ñÖеÄÎı¾¿Ø¼þÌ滻ΪÆäËü¿Ø¼þ? ´ð:Ê×ÏÈ£¬ÏÈ°ÑÔÀ´µÄÎı¾¿ò¿Ø¼þɾ³ý¡£
1:ÔÚÄúÒªÐ޸ĵÄÍø¸ñÉÏ°´ÏÂÊó±êÓÒ¼ü£¬Ñ¡Ôñµ¯³ö²Ëµ¥Öеġ°ÊôÐÔ....¡±
2:ÔÚµ¯³öµÄÊôÐÔ¶Ô»°¿ò¶¥¶ËµÄÁоٿòÖÐÑ¡ÔñÒªÌæ»»Îı¾¿òµÄcolumnϵÄtext1¡£ 3:ÔÚÍø¸ñÉÏ°´Ò»ÏÂÊó±ê×ó¼ü¡£
4:°´Ï¼üÅÌÉϵÄDELETE°´¼ü£¬É¾³ýText1¿Ø¼þ(Íø¸ñÉϵÄab1½«»áÏûʧ)¡£ Æä´Î£¬ÔÚÍø¸ñÉÏÌíÖÿؼþ¡£
1:ÔÚÄúÒªÐ޸ĵÄÍø¸ñÉÏ°´ÏÂÊó±êÓÒ¼ü£¬Ñ¡Ôñµ¯³ö²Ëµ¥Öеġ°±à¼....¡± 2:°´Ò»ÏÂ±íµ¥¿Ø¼þ¹¤¾ßÀ¸ÉÏÄúÒª¼Óµ½Íø¸ñÉϵĿؼþ¡£
3:ÔÚÄúÒªÌíÖÿؼþµÄcolumnÉÏ°´ÏÂÊó±ê×ó¼ü£¬²¢·ÅÖÿؼþ¡£ 9.ÈçºÎÔÚ±í¸ñ¿Ø¼þÖÐÓÃÑÕÉ«Çø·ÖÌض¨µÄ¼Ç¼£¿
ÔÚGRID±í¸ñÀﲻͬµÄÌõ¼þ¿ÉÒÔÓò»Í¬ÑÕÉ«µÄ±³¾°»ò×ÖÌåÀ´·Ö¿ªÂ𣿻شðÊǿ϶¨µÄ¡£ÄÇôÈçºÎʵÏÖÄØ£¿
ÔÚVFPÀïÓм¸¸öÓйرí¸ñµÄÊôÐÔ£º
Column.DynamicBackColor[ = cExpression] Column.DynamicForeColor[ = cExpression]
ËüÃÇÊÇÓÃÀ´¸Ä±ä±í¸ñ¿Ø¼þÖÐij¸öµ¥Ôª¸ñ±³¾°ºÍÇ°¾°µÄÉ«²Ê¡£ÁíÍ⻹ÓÐÁ½¸öÏà¹ØÊôÐÔ£º Grid.SetAll(\Öµ\ Grid.SetAll(\Öµ\ËüÃÇÊÇÓÃÀ´¸Ä±äÕû¸ö±í¸ñµÄ±³¾°ºÍÇ°¾°ÑÕÉ«µÄ£¬¿ÉÓÃËüÃÇÀ´¶ÔÑÕÉ«½øÐбí¸ñ³õʼ»¯¡£ÏÂÃæµÄʾÀýºÜ¼òµ¥£¬¾ÍÊǶÔÒ»¸ö±í¸ñÖÐÄêÁä´óÓÚ30ËêµÄ¼Ç¼ÓúìÉ«¼ÓÒÔ±ê¼Ç¡£
¶Ô±íµ¥FORM1µÄActivateʼþ±à³ÌÈçÏ£º