Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid does not refresh when after adding row from menu
Message
De
03/03/2003 12:30:12
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/03/2003 12:24:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00760102
Message ID:
00760422
Vues:
10
>>>>>I encountered a serious grid refreshing problem which
>>>>>I have'nt found any solution.
>>>>>
>>>>> To reproduce:
>>>>> Run the program at the end of this message
>>>>>
>>>>>Result observed:
>>>>> Empty grid
>>>>>
>>>>>Result Expected: Word Hello must appear. Press Ctrl+Tab to see the
>>>>> expected result.
>>>>Problem is in deleterow code. You need a better code there. For now try this instead of gridbase1.refresh as last line of deleterow :
>>>>
>>>>go recno(thisform.gridbase1.recordsource) in (thisform.gridbase1.recordsource)
>>>
>>>I added this line as last line in deleterow method but got an error
>>>
>>>record is out of range.
>>>
>>>Any help ?
>>
>>Andrus,
>>My own delete code for grid looks like :
>>
>>with GridObj
>>	Select (.RecordSource)
>>	Delete In (.RecordSource)
>>	Go Recno()
>>	.SetFocus()
>>endwith
>>
Cetin
>
>I use optimistics table-buffering (buffermode 5) always in grid editing.
>I actually buffer single row only and save it if user moves to other row.
>
>On deleting a just added bufered row (where recno() is -1), the table needs to be reverted to discard added row.
>
>It seems that you code does not handle this case so I cannot use it.
>Your code causes table to remain in dirty state where buffered changes
>are not discarded.

Right,
My code for editable grid is in a commercial product, sorry.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform