I have a grid in Extjs that has list of information from database, now I want that list be processed through php, how would I make the grid act as 开发者_JAVA百科a form, and when the list is clicked(multiselect true) the user gets the values of the list buttons, also, how would I disable the form buttons until list is seleted from grid?
Your question doesn't have enough information, so I can only give you some generic pointers.
To process the values from a grid: read the values from the grid's store and call Ext.Ajax.request passing whatever data you want from the grid.
Example:
var values = [];
store.each(function(rec){
values.push({id: rec.get('id'), value: rec.get('value')});
});
Ext.Ajax.request({url: '/my/url.php', jsonData: values});
To disable the form buttons until you click something just pass in the disabled: true to the config. You then listen for the grid's http://docs.sencha.com/ext-js/4-0/#/api/Ext.grid.Panel-event-itemclick and call button.enable when that happens
精彩评论