w2ui
Home
Get started
Demos
Docs
Blog
Support
Layout
Grid
Toolbar
Sidebar
Tabs
Form
Popup
Utilities
ver 1.3
ver 1.4
ver 1.5
ver 2.0
Grid
Overview
Events
Properties
Methods
w2grid.message
Shows a context message for the grid
message(options)
options
string|object
, text of the message or additional options
Returns
pormise
that is resolved when message is opened.
If you have following grid:
let grid = new w2grid({ name: 'grid', nestedFields: false, columns : [ { field: 'recid', text: 'ID', size: '50px' }, { field: 'lname', text: 'Last Name', size: '30%', editable: { type: 'text' } }, { field: 'fname', text: 'First Name', size: '30%', editable: { type: 'text' } }, { field: 'email', text: 'Email', size: '40%', editable: { type: 'text' } }, { field: 'sdate', text: 'Start Date', size: '120px', editable: { type: 'date' } } ... ], records: [ { recid: 1, fname: 'John', lname: 'Doe', email: 'john@gmail.com', sdate: '1/3/2012' }, { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'stuart@gmail.com', sdate: '4/13/2012' }, { recid: 3, fname: 'Jin', lname: 'Franson', email: 'jin@gmail.com', sdate: '3/3/2012' }, { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'susan@gmail.com', sdate: '5/3/2012' }, ] });
You can
w2ui.grid.message('Some message.') .then(event => { console.log('message is opened', event) }) .ok(event => { console.log('ok clicked', event) })
Or
w2ui.grid.message({ width: 500, height: 160, body: 'some message', buttons: '
Ok
', onClose(event) { console.log('custom close') } }) .then(event => { $(event.box).find('button').on('click', () => { w2ui.grid.message() }) console.log('message is opened', event) })
User Comments
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus