On the client-side listen for postSubmit and check the cancelled array in the JSON data. Any rows that were rejected will be listed there. You can then use error() or alert() to show a message to the user.
In Options().where(),how to use distinct or groupBy?
There is no option for either at this time. I figured that you would always want to be showing all options in the list, since each will be unique.
If you wanted to use distinct or groupBy you could either define a VIEW with them, and then read the results from that view, or use a custom function to get the options from the database and query it directly (i.e. with Knex, giving you the full list of options it has available).
hi,Allan.
I have a problem again. in bubble edit,if use leftJoin to link another table,click the linked table cell,console display error above.
dataTables.editor.min.js:66 Uncaught Unable to automatically determine field from source. Please specify the field name. For more information, please refer to https://datatables.net/tn/11
The page the error links to provides a detailed describe of the problem and how to resolve it. Basically the columns.data for the DataTable column and field.name for the Editor field don't match, so you need to tell DataTables which field you want to edit when that column is activated.
Ah, I see. This thread here (and here) talks about how to create a thumbnail, you need to create an action to do it. Then this section of the manual explains how to display it.
Answers
Thank you for letting me know about that. Fixed here and I'll have it in 1.9.1 which I'm working on.
Allan
Thank you,Allan! My question is resolved.
By the way. would you got Webpage a return message,tell user can't delete row,because the row was refered.
On the client-side listen for
postSubmit
and check thecancelled
array in the JSON data. Any rows that were rejected will be listed there. You can then useerror()
oralert()
to show a message to the user.Allan
Thanx!
Allan
Hi,Allan!
In Options().where(),how to use distinct or groupBy?
this is my program ,but distinct not is effect
.options(
new Options()
.table('capsule_pp_capsuleproduct')
.value('id')
.label('BatchNO')
.where(
There is no option for either at this time. I figured that you would always want to be showing all options in the list, since each will be unique.
If you wanted to use
distinct
orgroupBy
you could either define a VIEW with them, and then read the results from that view, or use a custom function to get the options from the database and query it directly (i.e. with Knex, giving you the full list of options it has available).Allan
I still want to use distinct in Options,becasue my DB recorder the field not is unqiue.
hi,Allan.
I have a problem again. in bubble edit,if use leftJoin to link another table,click the linked table cell,console display error above.
dataTables.editor.min.js:66 Uncaught Unable to automatically determine field from source. Please specify the field name. For more information, please refer to https://datatables.net/tn/11
Hi,
The page the error links to provides a detailed describe of the problem and how to resolve it. Basically the
columns.data
for the DataTable column andfield.name
for the Editor field don't match, so you need to tell DataTables which field you want to edit when that column is activated.Allan
Thanx.Allan
web page:
server :
namly, editor have not field"capsule_pp_capsuleproduct.BatchNO",then can't use bubble edit method on the field,isn't?
Hi,Allen
How to only update edited field , other can't edited field not update?
How to display to upload image as thumbnail in the table cell
Hi @wm111 ,
Does this example here help?
Cheers,
Colin
thanx,Colin.
But my image is too big,display it will to occupy almost totall webpage.
Hi @wm1111 ,
Ah, I see. This thread here (and here) talks about how to create a thumbnail, you need to create an action to do it. Then this section of the manual explains how to display it.
Cheers,
Colin