Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
>Hello everybody !
>
>I have a problem with grid behavior:
>
>Form1 calls form2
>form2 returns a value to form1
>
>form2 is a search form
>the user fills some search fields
>the result is shown in a grid
>thisform.grid1.recordsource = " "
>l_sqlcmd ="select... from .. where ...."
>sqlexec(conn,l_sqlcmd,(thisform.l_cursor)
>thisform.grid1.recordsource = (thisform.l_cursor)
>
>when doubleclicking on a textbox in the grid the form2 is released and a value
>from the aktiv row is returned to form1 at the unload event of form2
>
>grid1 is a class from a classlib which is manipulated at init of form2
>(columncount,header.captions,column.width .....)
>the class has some events that should always work (clicking on header = sorting, doubleclick on all textboxes in any column = thisform.release
>
>everything works well but only once ???????!!!!!
>
>form1 click on search button
>form2 is opend
>user fills in some search values
>result is shown in grid1 of form2
>clicking on a column header does the sort
>doubleclick on a textbox in a row releases form2 and returns the value to form1
>
>form1 click on search button again
>form2 is opend
>user fills in some search values
>result is shown in grid1 of form2
>doubleclick on a textbox of grid1 does nothing ??????
>clicking on a column header doesn't sort ????
>
>seems that all the events of the column objekts do not work
>or the grid uses standard textboxes,headers
>
>after rowcolchange event and highlight allways work
What is the grid.controlsource before and after the launch of form2? If the controlsource changes, VFP rebuilds the grid with baseclasses and fields in default order. Using a view that you requery or zap/append fromthe cursorsource are ways to avoid this behavior.
Chris.
Précédent
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