vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.64k stars 730 forks source link

Inline editing, add extra field #2445

Closed neoedmund closed 11 months ago

neoedmund commented 11 months ago

Describe the problem your feature will solve. My records has a key field named xid which is int type. I'd like to send this xid when saving the inline editing.

Describe the solution you'd like I found event onSave of grid, but don't know how to do the job correctly. please help.

Describe alternatives you've considered Can I using xid to replace builtin recid ? How?

Additional context

neoedmund commented 11 months ago

I just added recid into json with value of xid. works for some extent.

alexkuznetsov commented 11 months ago

In the configuration for a grid component you can assign any property from row as 'recid' - for example 'xid'. recid is just a record identifier, so, if 'xid' can be treat as identifier - just do it.

Example:

let grid = new w2grid({
   recid: 'xid',
   ...rest config
})