PDA

View Full Version : adding ID to pagingtoolbar?



intro
6 Sep 2010, 3:54 PM
Hi is it possible to send id inside sending data with paging toolbar?

Thanks in advance

Condor
6 Sep 2010, 10:44 PM
Set the id in the store baseParams.

intro
7 Sep 2010, 1:23 AM
HI i try to put BaseParams to id but when i klik on arrow for next page... nothing hepend because he just send

Source
start=11&limit=11
i add id params on load


Ext.StoreMgr.get('DownloadBazaEN').load({
params: {
id: id
}
});

my test php code
$limit=addslashes($_POST['limit']);
$start=addslashes($_POST['start']);
if ($start=="0" or $start=="") {$start=0;$limit=11;}

if ($limit!=""){$limit="Limit ".$start.",".$limit."";} else{$limit="";}


$safesql =& new SafeSQL_MySQL;
$idprikaz=addslashes($_POST['id']);
$section_Admin_safe= $safesql->query("SELECT * FROM IzbornikDownload WHERE NazivEN!='' AND IzbornikID='%i' ORDER BY ID DESC ".$limit."",array($idprikaz));

Condor
7 Sep 2010, 1:29 AM
Use:

var store = Ext.StoreMgr.get('DownloadBazaEN');
store.setBaseParam('id', id);
store.load({start: 0, limit: 11});

intro
7 Sep 2010, 11:57 AM
Thanks it is working greatttt :">