PDA

View Full Version : Live search Paging disabled



zaps
22 Apr 2007, 12:31 AM
Hello all
i am using live search(combo) every thing is fine the problem is with paging ,paging toolbar
disabled automatically how to enable paging toolbar
here is my code define combo :
var dsreader = new Ext.data.XmlReader({
record:'ROWS',
id:'ID',
totalProperty:'TotalCount'
},['ID','SOURCE','FRMUSERNAME', 'MESSAGE', 'DATE']);

var dslookup = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url: 'bll/InboxSearch.ashx'}),
reader:dsreader
//remoteSort: true
});

var resultTpl = new Ext.Template(
'<div class="search-item">',
'<h3><span>{DATE:date("M j, Y")} <br>{FRMUSERNAME}</span>{MESSAGE}</h3>',
'{Source}',
'</div>'
);
var search = new Ext.form.ComboBox({
store:dslookup,
displayField:'MESSAGE',
typeAhead: false,
loadingText: 'Searching...',
width: 400,
pageSize:10,
minChars:3,
hideTrigger:true,
tpl: resultTpl,
onSelect: function(record){
search.collapse();
Forum.ouvrirMess(record.ID);
}
});
search.applyTo('searchquery'); // apply it to the exsting input element
}

//Server response in xml format first 15 rows

Query having 786 rows even thou paging toolbar disabled!

<ROOT><TotalCount>768</TotalCount>

<ROWS>
<ID>4000</ID>
<SOURCE>Vacation Settlement</SOURCE>
<FRMUSERNAME>ABBAS</FRMUSERNAME>
<MESSAGE>DEAR HUSAIN
SEE IF IT HAS BEEN CHANGE OR NOT AND ADVISE
THANKS</MESSAGE>
<DATE>8/17/2003 2:43:00 PM</DATE>
</ROWS>
<ROWS>
<ID>3931</ID>
<SOURCE>Vacation Settlement</SOURCE>
<FRMUSERNAME>ABBAS</FRMUSERNAME>
<MESSAGE>JOIN DATE HAS BEEN CHANCHED</MESSAGE>
<DATE>8/16/2003 3:18:00 PM</DATE>
</ROWS>
<ROWS>
<ID>1377</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>AHMEDEGAL</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000023# has been Approved...</MESSAGE>
<DATE>6/9/2003 7:22:00 PM</DATE>
</ROWS>
<ROWS>
<ID>6907</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000017# has been Approved...</MESSAGE>
<DATE>10/2/2003 1:18:00 PM</DATE>
</ROWS>
<ROWS>
<ID>5398</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000014# has been Approved...</MESSAGE>
<DATE>9/7/2003 3:40:00 PM</DATE>
</ROWS>
<ROWS>
<ID>5611</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000015# has been Approved...</MESSAGE>
<DATE>9/10/2003 3:00:00 PM</DATE>
</ROWS>
<ROWS>
<ID>1810</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000002# has been Approved...</MESSAGE>
<DATE>6/23/2003 3:39:00 PM</DATE>
</ROWS>
<ROWS>
<ID>2712</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000007# has been Approved...</MESSAGE>
<DATE>7/24/2003 12:46:00 PM</DATE>
</ROWS>
<ROWS>
<ID>2089</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000003# has been Approved...</MESSAGE>
<DATE>7/2/2003 3:13:00 PM</DATE>
</ROWS>
<ROWS>
<ID>2234</ID>
<SOURCE>Payroll Voucher</SOURCE>
<FRMUSERNAME>ALI</FRMUSERNAME>
<MESSAGE>Payroll Vouncer No # #000004# has been Approved...</MESSAGE>
<DATE>7/10/2003 12:40:00 PM</DATE>
</ROWS>
</ROOT>

tryanDLS
22 Apr 2007, 10:37 AM
There are numerous threads regarding grid paging - I would suggest you review some of them. Paging is serverside, not clientside. A page is a subset of your entire resultset, not the entire result. If you say you have 768 totals rows and you return that many, you have 1 page.

zaps
22 Apr 2007, 8:55 PM
Thanks for ur replay

I have a grid with paging it is working fine but the problem is with live search combo.
paging toolbar disabled automatically.how to enable paging toolbar for combo?
for grid paging toolbar created manually, but for combo it appears automatically which is disabled how i enable paging toolbar?

zaps
27 Apr 2007, 11:48 PM
Some look at this please

rqmedes
14 May 2007, 9:26 PM
Live search requires a minimum of 4 characters.

any way to change this number, not readily apparent in the example code?

rqmedes
14 May 2007, 9:28 PM
Maybe i should read the documentation before posting sorry all.

If any one is curious , it is plain as day in the documentation under combobox

minChars