hello , but it is very complicated to select a row of a datatable after the insert / modify operations ??
I hope in your help …
Hello,
You can use the onAfterAdd event
$$('some').attachEvent("onAfterAdd", function(id, index){
this.select(id);
});
http://webix.com/snippet/4c63963d
Whatever “modify” means, you can always get the item id from the related event and use it in the select()
method.
i have a problem when i want select a specify row after load datatable.
this work:
on:{
‘onAfterLoad’: function(){
var rowid = this.getFirstId();
this.select(rowid);
}
}
if i want sel another rowid not work
Please show a snippet of the problematic code. Seems like it works as expected:
Thanks for the reply .
The problem is that I have a datatable loaded from a table of a DB , and the primary key is called IdUtente.
So if I do onAfterLoad : function ( ) {
this.select ( 10 )
}
you do not select the row datatable.
my query is:
Select IdUtente,cCognome,cNome FROM Users.
if i modify the query in:
Select IdUtente as id,cCognome,cNome FROM Users row select work
therefore possible that in my query I always assocciare my primary key as id for select the row ?