helavissa
18 Nov 2010, 12:21 AM
Hi,
I've never used Ext forms, the problem I have seems to be simple, but I can't figure it out.
I have a grid with checkboxes on the left to select rows and submit button in the bottom.
var sm = new Ext.grid.CheckboxSelectionModel({});
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
sm,
{id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
{header: 'Price', width: 75, sortable: true, dataIndex: 'price'},
{header: 'Change', width: 75, sortable: true, dataIndex: 'change'},
{header: '% Change', width: 75, sortable: true, dataIndex: 'pctChange'},
{header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
],
sm: sm,
stripeRows: true,
autoExpandColumn: 'company',
height: 350,
width: '100%',
title: 'Array Grid',
stateful: true,
stateId: 'grid',
enableColumnResize : false,
bbar: [
{
xtype: 'button',
text: 'submit',
listeners: {
'click': {
scope: this,
fn: function(src, e) {
// ???
}
}
}
}
]
});
All I want to do is to post data from the selection model to a certain link when user clicks submit, I don't even know if need to create form for that.
I've never used Ext forms, the problem I have seems to be simple, but I can't figure it out.
I have a grid with checkboxes on the left to select rows and submit button in the bottom.
var sm = new Ext.grid.CheckboxSelectionModel({});
var grid = new Ext.grid.GridPanel({
store: store,
columns: [
sm,
{id:'company',header: 'Company', width: 160, sortable: true, dataIndex: 'company'},
{header: 'Price', width: 75, sortable: true, dataIndex: 'price'},
{header: 'Change', width: 75, sortable: true, dataIndex: 'change'},
{header: '% Change', width: 75, sortable: true, dataIndex: 'pctChange'},
{header: 'Last Updated', width: 85, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
],
sm: sm,
stripeRows: true,
autoExpandColumn: 'company',
height: 350,
width: '100%',
title: 'Array Grid',
stateful: true,
stateId: 'grid',
enableColumnResize : false,
bbar: [
{
xtype: 'button',
text: 'submit',
listeners: {
'click': {
scope: this,
fn: function(src, e) {
// ???
}
}
}
}
]
});
All I want to do is to post data from the selection model to a certain link when user clicks submit, I don't even know if need to create form for that.