This is a client-side example of instantiating a treegrid object:
TreeGrid({ // Object supplied defining the treegrid instance
Layout:{ // Data source for grid structure, definitions and columns
and usually fixed rows
Url:def_url // Each Url may be of a static document, or
representing a back-end controller-action
}, // *You may validate the urls with something like
"Layout:(def_url!==''?{Url:def_url}:{})"
Data:{ // Data source for all grid data, usually variable rows
Url:data_url, // For server paging (Cfg.Paging = 3) it should
contain only variable data rows
Param:params // "params" are the "vars" that you send to the
controller-actions
},
Upload:{ // Destination for upload changed data from grid (in effect the
"save" operation)
Url:upload_url,
Param:params,
Xml:1, // use an xml
Attrs:upload_attrs, // rarely used - look it up if you need to
Type:upload_type // rarely used - means "all data" or "just the
changes"
}
},tag); // the div that will contain TreeGrid
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.