代碼片段: var role=s[0].Role;// role contains string value
dijit.byId("editRole").attr("Value",getRoleByName(role));
function getRoleByName(role)
{
var roleVal;
alert(role);
switch(role
這裏是我的DataGrid: // $ is a reference to `this` as it lies in an anonymous function
$.grid = new DataGrid({
store : $.dataStore,
query : {id : "*"},
structure : [
{
noscroll