Unable to automatically determine field from source. Please specify the field name
Unable to automatically determine field from source. Please specify the field name
I've got this error on editor window open.
Here are my
datatable columns
"columns": [
{ "data": "season_start" },
{ "data": "season_end" },
{ "data": "p" },
{ "data": "min" },
{ "data": "f" },
{ "data": "a" },
{ "data": "yc" },
{ "data": "rc" },
{ "data": "r" },
{ "data": "g" },
{ "data": "y" },
{ "data": "ws"},
{
"data": null,
defaultContent:'<span class="action"><span class="glyphicon glyphicon-edit edt_statistic"></span> <span class="glyphicon glyphicon-remove del_statistic"></span></span>'
}
],
and my editor columns:
fields: [
{
label: "P:",
name: "p"
},
{
label: "MIN:",
name: "min"
}, {
label: "F:",
name: "f"
}, {
label: "A:",
name: "a"
}, {
label: "YC:",
name: "yc"
}, {
label: "RC:",
name: "rc"
}, {
label: "R:",
name: "r"
}, {
label: "G:",
name: "g"
}, {
label: "Y:",
name: "y"
}, {
label: "WS:",
name: "ws"
},
{
label: "Season start:",
name: "season_start",
type: "date",
"opts": {
format: 'yyyy',
minViewMode: 'years'
}
},
{
label: "Season end:",
name: "season_end",
type: "date",
"opts": {
format: 'yyyy',
minViewMode: 'years'
}
}
]
What is wrong with it? Please, help me
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Can you link to the page in question please? Or at least perhaps show us the full code - specifically I'm interested in how you are adding the event listener for triggering the inline edit.
It looks like it should work just fine for columns such as
f
andmin
as far as I can see.Also, have you read the tech note that explains this error?
Allan
Allan, can give link with password to you. Can't give it to the public.
Here is the code of event listener:
Okay - so that is going to make every cell in the table editable. Can you confirm that
$(this).data('field')
returns the field name you want to edit? A simpleconsole.log
would confirm it.Allan
Actually this inline edit working fine except select date fields but on opening the same table through
show this error in console
What error?
It would be very useful if you could link me to the page please. Click on my name above and then "Send message" to PM me the details.
Allan
Thank you Allan for your help.
I have found the cause of the problem.