Get field for cell
Get field for cell
Is there a way to get a field name or field instance for a <td>
element or in fact any object that looks like a cell-selector
?
This question has accepted answers - jump to:
This discussion has been closed.
Is there a way to get a field name or field instance for a <td>
element or in fact any object that looks like a cell-selector
?
This question has accepted answers - jump to:
Answers
Yes -
column().dataSrc()
. Assuming that the column data point (columns.data
) matches the Editor field data point.Allan
Ah yes, thank you!
Unfortunately that method ignores
columns.editField
.Any way to get a column's editField (if any) from the API?
PS: I'm trying to get the field inside a
preOpen
handler after callinginline()
. So I have a hunch that Editor already knows which field will be edited. I just don't know how to pull that information out of the API.It does. I'm afraid there isn't actually a public API for that at the moment. You would need to use
table.settings()[0].aoColumns[i].editField
to get that property at the moment. It would be best to create a plug-in API method for it. Even better would be to have a plug-in method that would check for that parameter, if defined, return that, if not returncolumn().dataSrc()
.Allan