Information générale
Catégorie:
Programmation Orientée Object
Titre:
Problem in Custom grid as class that like delphi's DBGrid
at first ,excusal me for my bad english
The order of new grid
1.Automatic add a record,When the grid get focus,and it's readonly property is .F.,and records number is 0.
2.Automatic add a record,When click on the no data area in the grid,and it's readonly property is .f.,and last¤t record is valid.
3.Automatic go to next row,when use keyboard turn focus between columns,and the column is last or specified.And at the same time ,if it's readonly property is .f. and
at the last row,need to automatic add a new record.
Õˆ½ÌêP춶¨ÖÆîËÆDELPHIµÄGRIDî•rÓöµ½µÄ†–î}
¶¨ÖÆÄ¿˜Ë£º
1.·ÇÖ»×xÇé›rÏ£¬®”GRID«@µÃ½¹üc•r£¬Èç¹ûGRIDÖеÄӛ䛔µžé0(µ«RECORDSOURCEÓÐЧ)•r×Ô„ÓÔö¼ÓÒ»—lӛ䛡£
2.·ÇÖ»×xÇé›rÏ£¬®”†Î“ôGRIDµÄ¿Õ°×…^Óò•r£¬Èç¹û®”Ç°ÐкÍÄ©Ðж¼ÊÇÓÐЧӛ䛣¬„t×Ô„ÓÔö¼ÓÒ»Ò»—lӛ䛣¬Kʹ֮«@µÃ½¹üc¡£
3.®”ÓÃENTER»òTAB»ò·½ÏòæIÔÚ¸÷ÁÐÖÐÒÆ„Ó•r£¬Èç¹ûÒÆ„Óµ½Ìض¨ÁÐ(»òÄ©ÁÐ)•r×Ô„Ó“QÐУ¬ÈçÔÚ·Ç
Ö»×xÇé›rÏ£¬ÇÒÔÚÄ©ÐеÄÌض¨ÁУ¬„t×Ô„ÓÔö¼ÓÒ»ÐУ¬Kʹ֮«@µÃ½¹üc¡£
ÕfÃ÷£º
ÓÉì¶ÊǶ¨ÁxîÒÔ¹©Ê¹Ó㬹ʶ¨Áx•rŸoÁÐŒ¦Ï󣬼´Ö»ÄÜÔÚGRID±¾ÉíµÄʼþÖÐÏëÞk·¨(When\beforeRowColChange\afterRowColChange\Click)
¼s¶¨GRIDÖеĔµ“þʹÓÃé_·Åʽ±í¾›_
†–î}£º
ÓЕr×Ô„ÓÔö¼ÓƒÉ—l£¬KÇÒ×îááÔö¼ÓµÄÒ»—lÓÐy´a£¬K²»ÊÇÕæÕýµÄAppend blankÁ˃ɴΣ¬
ÒòžéëmÈ»¸÷ʼþ¿ÉÄÜÖØÍ°lÉú£¬µ«ÊÇÔÚÔö¼Ó•r¶¼ÓÐŒ¦Ä©—lµÄÐÔÙ|ßMÐЙzœy£¬Kͨß^œyÔ‡Ô^Ã÷ÁËß@üc£¬
²»ÖªµÀÊDz»ÊÇVFP±¾Éí߀ÓІ–î}£¬ÎÒÓXµÃß@Щ¹¦ÄÜ‘ªÔ“¶¼ÊÇ¿ÉÒÔŒ¬FµÄ£¬ÖÁÉÙDELPHI³ýŒ¬FÁËÉÏÊö¹¦ÄÜÍâ߀ÓÐ×Ô„Ó„h³ý¿ÕÄ©ÐеŦÄÜ
ß@‚€†–î}À§”_ÁËÎҺܾã¬Ï£Íû¸÷¸ßÊÖ£¬ÄܱM¿ìŽÍÎÒ½â´ð£¬»òÕfÃ÷GRIDµÄƒÈ²¿™CÖÆÒà¿É¡£
------------------------
´ó´ó
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement