No me funciona en NeoTable "neoTableDeleteSelectedRows" - Forum

Forum Navigation
You need to log in to create posts and topics.

No me funciona en NeoTable "neoTableDeleteSelectedRows"

No logro hacer funcionar la opcion "neoTableDeleteSelectedRows" dentro de la subrutina

Tampoco logro hacer funcionar la opcion "neoTableDeleteRowById " , supongo que aqui el "Id" es el que le asigne a cada registro que agregue al array comenzando en "0"

La unica ocpion que logro hacer funcionar es "neoTableDeleteRowsByValue"

 

La subrutina es :

If [neoTableEvent] == "click"

neoTableDeleteSelectedRows "Container52"

endif

@gustavo1973

The subroutine is:
If [neoTableEvent] == "click"
neoTableDeleteSelectedRows "Container52"
endif

1) is this subroutine defined as a parameter in the command neoTableInitTable ?

2) if it is, can you confirm that this subroutine is being invoked and that [neoTableEvent] has the value "click" by inserting this command at the start of this subroutine ...

AlertBox "neoTableEvent" "[neoTableEvent]" ""

... if it shows click, can you post a tiny .neoapp file with just the minimal commands to load your table, and your subroutine ?

@gaev

1.yes, the subroutine is defined when starting the table
2.yes, [neoTableEvent] has the value "click"

I upload an example where some options of the subroutine work ok and others don't
The only one that works well is the delete by value
 
 
Uploaded files:
  • You need to login to have access to uploads.

@gustavo1973

Thank you for the response and sample app file.

I upload an example where some options of the subroutine work ok and others don't
The only one that works well is the delete by value

Actually, it ONLY works when the field contains string (text) values ... neoTableDeleteRowsByValue "Container53" "Valor" "[Valor]" ... did NOT work until I changed the values to be string/text i.e. with double quotes around them when defining the array.

If this is a bug (defect), probably the same applies when you try ... neoTableDeleteRowById "Container53" [id] ... id's are numbers (not text).

This command ... neoTableDeleteSelectedRows "Container53" ... most likely did not work because (it looks like) when you click on the row (in Card View), it was not selected.

I need to do some more experimentation to see if the same results happen in Table Mode; it is 11 pm over here (bed time), so I will look into it further tomorrow (Friday).

@gustavo1973 @gaev adjunto ejemplo corregido. Fíjate que no puedes seleccionar ninguna fila si no utilizas neoTableSetSelectColumn sobre un campo de clave primaria, en este caso el "id".

Resulta mucho más fácil entender el problema si, como en este caso, adjuntas un ejemplo.

Saludos!

Uploaded files:
  • You need to login to have access to uploads.

Hello and good time dear friend! How can we change the background color of the row by clicking! For example, can our row be selected by clicking and the background color be blue? Thankful

Add the following code to the project style:

tbody tr.selected {
color: #FFFF00;
background-color: rgba(3,146,206,0.41); /* Row selection color code */
}