I want to conditionally show rows as editable when the datasource is lacking values.
The purpose is to have a predefine values for users on page load
Only thing that kinda works is adding grid.editRow(row) for the databound but this only works if there is a single item and this disables firing of my inline buttons
function AddPreDefinedValues(){
setTimeout(function () {
var grid = $('#logGrid').data('kendoGrid');
var data = worklogDataSource.data();
var i = 0;
console.log('**** check items: '+data.length);
for(var item in data){
var newIndex = 0;
if(i != 0){
newIndex = i - 1;
}
if(data[item].Id === null){
console.log('************** '+newIndex);
var s = '#logGrid tr:has(td):eq('+newIndex+')';
grid.editRow($(s));
}
i++;
}
}, 0);
}
When data source has complete value, show row as read only but when a value is missing for a field then show row in edit mode