PDA

View Full Version : Ext.ux.form.SearchField problem...



claudiomir
2 Dec 2009, 4:45 AM
Hi to all,

I'm building a PanelGrid with a toolbar that have an Ext.ux.form.SearchField component (based on: http://www.extjs.com/deploy/dev/examples/form/custom.html). But I get de error: Ext.ux.form is undefined. The GridPanel is not rendered.

I'm using: Ext-JS 3.0.3



Ext.onReady(function(){
var store = new Ext.data.JsonStore({
...

});
store.setDefaultSort('login', 'desc');


var grid = new Ext.grid.GridPanel({
width:700,
height:500,

// grid columns
columns:[{
header: "Login",
dataIndex: 'login',
width: 50,
renderer: renderLogin,
sortable: true
},{
header: "Nome",
dataIndex: 'nome',
width: 100,
sortable: true
},
...
],

// customize view config
viewConfig: {
forceFit:true,
enableRowBody:true
},

tbar: [
'Pesquisar: ', ' ',
new Ext.ux.form.SearchField({
store: store,
width:320
})

],

// paging bar on the bottom
bbar: new Ext.PagingToolbar({
pageSize: 5,
store: store,
displayInfo: true,
displayMsg: 'Mostrando resultados {0} - {1} de {2}',
emptyMsg: "Não há resultados para exibir."
})
});

// render it
grid.render('grid-div');

// trigger the data store load
store.load({params:{start:0, limit:5}});
});


Thanks...

claudiomir
2 Dec 2009, 11:19 AM
Hi people,

Some clue?

Thanks!

claytondf
8 Dec 2009, 4:00 PM
Load js into php.

<script type="text/javascript" src="../../../ext2/examples/ux/gridfilters/filter/DateFilter.js"></script>
<script type="text/javascript" src="../../../ext2/examples/ux/gridfilters/filter/ListFilter.js"></script>
<script type="text/javascript" src="../../../ext2/examples/ux/gridfilters/filter/NumericFilter.js"></script>
<script type="text/javascript" src="../../../ext2/examples/ux/gridfilters/filter/BooleanFilter.js"></script>
<script type="text/javascript" src="../../../ext2/examples/ux/SearchField.js"></script>

gurpal2000
6 Jan 2010, 6:12 AM
did you get this fully working with a grid? does it send query, start and limit properly ?