Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid: Getting rowNum or record from a link column/field

    On a ListGrid, i used a link column to put delete functionality to my records. I have no problems deleting the record on the server and want to delete the record on the grid/display also. This is the field:
    {
    name:"delete", title:"Delete",
    type: "link",
    width:50,
    align:"center",
    linkText:isc.Canvas.imgHTML("/images/delete.png",24,24)
    }

    the link is a javascript link, i would like to get the record or the rowNum of that record. how do i get these on click of the link, without selecting/focusing the record. these is a sample link:

    'javascript: getObject("InventoryTab").deleteRecord("5")'

    what can i add on that link to identify which record was clicked on the grid?
    or can i add an attribute or event to my grid or field to get this?

    i would like to use grid.removeData(data) to remove the row on the grid. to get the data variable, i would need the record or recordNum.

    Data is not bound, I have done populating the grid via grid.setData() on a json web service.
Working...
X