PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → delete table selected record
delete table selected record
Iniciado por Hugo Brites, jun., 20 2008 1:17 PM - Sem resposta
Publicado em junho, 20 2008 - 1:17 PM
Hi,

I have a table with linked to a HF table. This table is a selection table with multiple selection enabled.
When I click a link, I run the fowling server code in ajax mode
FOR EACH SELECTED ROW OF TABLE_Grupos
IF HSeek(AuthGrupos,AuthGruposID,TABLE_Grupos.GruposId) THEN
EDT_Mensagens += "Erasing record id " + TABLE_Grupos.GruposId + " with name " + TABLE_Grupos.Nome + CR
IF NOT HDelete(AuthGrupos,hCurrentRecNum) THEN
EDT_Mensagens += "Hyper File error: " + HErrorInfo() + CR
END
ELSE
EDT_Mensagens += "not found record id " + TABLE_Grupos.GruposId + " with name " + TABLE_Grupos.Nome + CR
END
END
HReset()
TableDisplay(TABLE_Grupos)
LINK_Delete..Visible=False


Now two things happen.

The first, the for each loop works and it runs, but instead of deleting the record it just delete the first selected record. It still runs the other selected rows and hdelete does return true on the deletion of the records. But only the first selected row is indeed deleted.

Second, despite the flags I put in table display simply does not refresh well, as it just delete a row in the table, but it does not refresh the rows contents.

Regards,
Hugo Brites