Editor in a modal popup
Editor in a modal popup
Hi there,
We recently purchased a license and are attempting to switch from using purely jeditable with datatables, to now using the editor extension. We'd like to be able to attach an 'envelope' type interaction when editing/adding to our table; however, we're having some difficulties doing so.
Our situation is a little odd because we're working with a mix of legacy aspx and mvc3. We render our modal from a string of html. I think because either a) we're trying to do this in a modal or b) the way we render our modal, when we get to the "_findAttachRow" method self._dte.s.domTable is not set.
[code]
var envelopeConf = $.fn.dataTable.Editor.display.envelope.conf;
envelopeConf.attach = 'head';
envelopeConf.windowScroll = false;
editor = new $.fn.dataTable.Editor({
"domTable": "#sortable-datatable.summary-grid",
"display": "envelope",
"fields": [{
"label": "Contents:",
"name": "Contents",
"type": "textarea"
}]
});
[/code]
We recently purchased a license and are attempting to switch from using purely jeditable with datatables, to now using the editor extension. We'd like to be able to attach an 'envelope' type interaction when editing/adding to our table; however, we're having some difficulties doing so.
Our situation is a little odd because we're working with a mix of legacy aspx and mvc3. We render our modal from a string of html. I think because either a) we're trying to do this in a modal or b) the way we render our modal, when we get to the "_findAttachRow" method self._dte.s.domTable is not set.
[code]
var envelopeConf = $.fn.dataTable.Editor.display.envelope.conf;
envelopeConf.attach = 'head';
envelopeConf.windowScroll = false;
editor = new $.fn.dataTable.Editor({
"domTable": "#sortable-datatable.summary-grid",
"display": "envelope",
"fields": [{
"label": "Contents:",
"name": "Contents",
"type": "textarea"
}]
});
[/code]
This discussion has been closed.
Replies
Allan
Sorry to be confusing. Our datatable is contained within a modal. We'd like to add the envelope effect on that table. We bind our datatable on the document ready to the fully formatted table on the page and that works just fine. However we are unable to bind the Editor to the same table using the "domTable" attribute.
I hope that makes sense, I'm not 100% familiar with the terminology here.
The workflow is: Open modal -> bind datatable to dom table -> bind editor to same dom table.
We want the envelope to attach to the already open modal.
An update for you.
I've fixed the situation, turns out that it was an issue with the order of our scripts.
However, there is something else that I came upon when using the "Envelope" container.
the section in the envelope display is as follows.
//event handlers
$(self._dom.close).unbind( 'click.DTED_Lightbox' );
$(self._dom.background).unbind( 'click.DTED_Lightbox' );
$('div.DTED_Lightbox_Content_Wrapper', self._dom.wrapper).unbind( 'click.DTED_Lightbox' );
Not sure if this what mean to be an out-of-box feature or if it has been updated. But thought I would note that there are some collisions with the naming that cause errors for multiple cancels without any submits inbetween.