Announcements
Hi, Currently i try create a new personal windows form, how part of my training on VB.net. My windows form include 2 tables (author and books), mi goal is add, modify and eliminate entries of both tables with native functions of dynamics. At this moment have probles to modufy and delete on the safgrid i cand add without problems, but only can modify the first line on the grid. If try delete a register, the application only delete the first one or if select two or more delete the same registers take the first.
When debug the proyect i see the program doesn't send a message to ask if i sure to delete the information when delete from the safgrid control.
Why need to update and/or delete entries in the saftgrid using this buttons???
This is a screen of my proyect
try to delete id 04
when save usig button "save", the id deleted is 0
i apreciate your help and any advice to create custom forms. Have a nice day
*This post is locked for comments
1.- The main table is "Autores" (pk idautor varchar(6), nombre varchar(50), nacionalidad varchar(50)) and "libros" (pk idlibro varchar(6), nombre varchar (50), editorial varchar(50), year varchar(4), fk idauthor varchar(6))
index_keys: idlibro, idautor .
2.- I only use a SP for posible values to idautor on level 0 (select * from autores)
3.- To fill de grid, I use a query "select * from libros where idautor like @pamr1 order by idlibro" @parm1 is equal bautores.idautor
4.- Dim MemHandle_Spread1 As Object
Call ApplInit()
Call SetAddr(LEVEL0, "bautores", bautores, nautores)
Call SetAddr(LEVEL1, "blibros", blibros, nlibros)
Call SqlCursorEx(c1, LEVEL0, "c1", "autores", "autores")
Call SqlCursorEx(c2, LEVEL1, "c2", "libros", "libros")
Call ScreenInit()
MemHandle_Spread1 = DetailSetup(c2, SafGrid1, PNULL, blibros, PNULL, PNULL, PNULL)
Control SAFUpdate Levels=autores;N,libros;D Name=Update1.
First of all, to know better what the causes are, we need to know four things.
1.- The structure table, principaly the primary key fields.
2.- The definition of the store procedure
3 - The DVNav property of the grid
4 - The form_load code
André Arnaud de Cal...
293,476
Super User 2025 Season 1
Martin Dráb
232,592
Most Valuable Professional
nmaenpaa
101,158
Moderator