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);
}
});
});