First Data Table Experiment

@Margo

How do I increase the row height dynamically when the user enters a long comment? Currently behaves as a single line of text.

The 'PostBy' and 'DatePosted' values work beautifully.

//select the Data Table control to automatically populate new rows
fd.spRendered(function() {
var dt = fd.control('DiscussionDT');
var username = _spPageContextInfo.userDisplayName;
var date = new Date().toISOString();
dt.widget.bind('beforeEdit', function(e) {
    var model = e.model;
    if (model.isNew()) {
        model.set('PostedBy', username);
        model.set('DatePosted', date);
      }

   });
});

The 'Comment' field won't accept any input and looks like a Read only field.

UPDATE (found in DataTable - Default Date - #14 by Margo):

//select the Data Table control to automatically populate new rows
fd.spRendered(function() {
var dt = fd.control('DiscussionDT');
var username = _spPageContextInfo.userDisplayName;
var date = new Date().toISOString();
//dt.widget.bind('beforeEdit', function(e) {  //-- 'beforeEdit' places the row in Read only
dt.widget.bind('edit', function(e) {    //-- 'edit' allows the row to accept Edits
    var model = e.model;
    if (model.isNew()) {
        model.set('PostedBy', username);
        model.set('DatePosted', date);
      }

   });
});

This functionality is not currently available. We can offer paid support to implement this feature. If you are interested, please contact us via email at support@plumsail.com

Ahhh, ok. Understood. Thank you @Margo. I hope you are doing well and I appreciate your reply. And I wanted to thank Plumsail for adding the "Solution" tag a while ago - it makes a difference when searching for ideas and fixes that someone has already accomplished!

1 Like