I'm not sure I understand what you are asking.
This is how I'm capturing data from my db based on a row click:
var attributeDefs;
var resourceDef;
var resources;
var attributeValues;
var attributeIds;
$(function(){
$('#RN').datagrid({
onClickRow: function(index,row){
editIndex = index;
rowEdit = JSON.parse(JSON.stringify($('#RN').datagrid('getRows',editIndex)));
var editResourceName = rowEdit[editIndex].resourceName;
var editResourceId = rowEdit[editIndex].resourceId;
$.ajax({
url: baseUrl + '/clients/' .... /attributes',
type: "GET",
}).done(function(data) {
attributeDefs = data.attributeDefs;
resourceDef = data.resourceDef;
resources = data.resources;
attributeValues = data.attributes.values;
attributeIds = data.attributes.ids;
window.alert("resourceDef: " + resourceDef + " attributeValues: " + attributeValues);
});
}
});
});
I was thinking there might be some way to use "Load Form Data" ( SEE:
http://www.jeasyui.com/demo/main/index.php?plugin=Form&theme=default&dir=ltr&pitem= ) to populate a form when a user clicks a row in the grid. But I haven't had any luck.