fix to use $grid->edit()  also when source is a Query/QueryBuilder  assuming  keyname=id  or  the given one