Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>Hi! I've created a form for entering data for a parent & child file.I'm using a grid with methods for adding and deleting items. What happensis that the grid refresh properly only some of the times. I'm usingthisform.lockscreen=.T. thisform.gridrefresh thisform.lockscreen=.F.but even then on adding new item after the first few items the gridjust dosen't seem to refresh ?ThanksSonali
>>>
>>>If you add items programatically, you can set focus to the first control on the first column, in order to refresh this row.
>>>
>>>mygrid.setfocus()
>>>mygrid.column1.text1.setfocus()
>>>
>>>If you add items interactivelly within the grid you'll not need this.
>>>
>>>Hope this helps
>>
>>But I would have thight that by refreshing the grid all the rows are automatically refreshed and the display correct.
>
>I've found in the past a lot of problems refreshing grids, and to see a new item assigning focus to it is the only way i've found.
My setting focus to the grid after adding an item has solved a
part of my problem, however when I delete an item the problem still
persists. Let me elaborate - I'm using a grid recordsource - child table
( form optimistic buffering, private data session ). I'm using
cmdbuttons for adding/deleting items. Now when I add a new item &
then press the delete button the item is still displayed in the grid
( I'm setting some default values ). I think that as this is the last
row in the grid on refreshing only take place to the row above as
this record has been deleted! What I think I need is a method to
totally blank out the grid and refresh it!
Any ideas will be greatly be appreciated as I've not been able to
create a one-to-many entry form.
Thanks in Advance
Sonali
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