1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Exclamation Grid doesn't update when paging

    Grid doesn't update when paging


    This has been plaguing me for days. I can't get a grid to update when paging.

    The grid renders fine initially.

    I can see that new json data is being retrieved when the paging buttons are pressed.

    On the datastore, I've tried adding listeners for "load" and "datachange" to fire the grid's reconfigure method.

    Code:
    var sm = new xg.CheckboxSelectionModel();
    
    var groupsData = new Ext.data.Store({
    	proxy: new Ext.data.HttpProxy({url: 'http_getGroups.php'}),
    	listeners: {load : function(){
    		groupsGrid.reconfigure(this,new xg.ColumnModel([
    				sm,expander,
    				{id:'name',header: "Name", width: 200, sortable: true, dataIndex: 'name'},
    				{header: "Description", width: 400, sortable: true, dataIndex: 'desc'}
    			])
    		);
    	}},
    	reader: new Ext.data.JsonReader({
    	  root: 'groups',
    	  totalProperty: 'totalCount',
    	  id: 'id'
    	},
    	[
    	  {name: 'name', mapping: 'name'},
    	  {name: 'desc', mapping: 'desc'}
    	]),
    	remoteSort: false
     });
    groupsData.load({params:{start:0, limit:26}});
     
    groupsGrid =  new xg.GridPanel({
    	ds: groupsData,
    	cm: new xg.ColumnModel([
    		sm,expander,
    		{id:'name',header: "Name", width: 200, sortable: true, dataIndex: 'name'},
    		{header: "Description", width: 400, sortable: true, dataIndex: 'desc'}
    	]),
    	height: 400,
    	
    	sm: sm,
    	plugins: expander,
    	collapsible: false,
    	tbar: new Ext.PagingToolbar({
    		store:groupsData,pageSize: 25, displayInfo: true, displayMsg: 'Displaying Groups {0} - {1} of {2}', emptyMsg: "No groups to display"
    	}),
    	title: 'Select which Reporting Suite Groups this User is allowed to access...',
    	renderTo:$("groupsGrid")
    });

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    do you have your php script to accept start and end paramters? Is it making calls?

  3. #3
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Default


    Yeah. The php is fine. I'm checking the http calls (in Fiddler) and it returns the appropriate records. Everything works exactly as it should, except the grid never updates.

  4. #4
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Default


    Anyone?

  5. #5
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Default Help

    Help


    Jack? Somebody?

  6. #6
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    can you try a script tag proxy see if that works?

  7. #7
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Default


    How would I use it for this?

  8. #8
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    proxy: new Ext.data.HttpProxy({url: 'http_getGroups.php'}), change to ScriptTagProxy like the examples

  9. #9
    Ext User
    Join Date
    Oct 2007
    Posts
    15
    Vote Rating
    0
    Horace is on a distinguished road

      0  

    Question data problem?

    data problem?


    I started with the example at: http://extjs.com/deploy/ext-2.0-alph...id/paging.html.

    I tried replacing the ScriptTagProxy's url param with the url to the php page that generates my data, and then the other appropriate data points with the names of the data points from my json object. The grid rendered perfectly just as it should, except paging wouldn't work.

    This makes me wonder if there's something wrong with the http response from my php page.

    Here's the http response returned from my php page, with the json object wrapped in the callback function call:
    Code:
    deleted
    I noticed that the http response from the example has some extra stuff:
    Code:
    2ff7
    stcCallback1003({"totalCount":"14312","topics":[{"threadid":"14743","forumid":"5","forumtitle":"Help","title":"Grid doesn't update when paging","author":"Horace","lastposter":"djliquidice","lastpost":"1192116323","excerpt":"This has been plaguing me for days. I can't get a grid to update when paging.\r\n\r\nThe grid renders fine initially. \r\n\r\nI can see that new json data is being retrieved when the paging buttons are pressed.\r\n\r\nOn the datastore, I've tried adding listeners for \"load\" and \"datachange\" to fire the grid's r...","replycount":"7"},{"threadid":"14947","forumid":"11","forumtitle":"Premium Help","title":"Loose DOM elements","author":"sidebog7","lastposter":"sidebog7","lastpost":"1192115659","excerpt":"I am creating an application that tries to keep the number of page refreshes down to a minimum therefore it is necessary for me to destroy grids (and other Ext components).  However I have come across a problem that upon destroying a grid several DOM elements remain in memory until a full page reloa...","replycount":"0"},{"threadid":"14929","forumid":"5","forumtitle":"Help","title":"Properly formatted response from server for form submit","author":"aacraig","lastposter":"chemist458","lastpost":"1192115556","excerpt":"I looked through both the documentation and the forum and could find no explicit mention of how a response is expected back from the server on a form submit.\r\n\r\nCertainly such documentation DOES exist, I just couldn't find it.  I imagine it's somewhere, but I wonder if it might be an idea to stick i...","replycount":"1"},{"threadid":"14604","forumid":"9","forumtitle":"Help","title":"How to create a loginform?","author":"fear4me","lastposter":"jimmyphp","lastpost":"1192114964","excerpt":"Hi,\r\n\r\nI'm just starting using ExtJS and want to create a loginform, before my application starts. After succesfull login the form should disappear and show the main application. If it's possible there must set some PHP-sessionvars.\r\n\r\nDoes anyone has a demo-script (ExtJS 2.0 preferable) which handl...","replycount":"5"},{"threadid":"14943","forumid":"9","forumtitle":"Help","title":"Basic form and multiple tabs in tabpanel","author":"mschering","lastposter":"mschering","lastpost":"1192114836","excerpt":"I'm trying to get a form built from existing markup. It has multiple tabs. When I put this inside a window it doesn't work because it alters the form tag so that it is placed outside the window. This used to work in v1.1 but in 2.0b1 it doesn't send any variable. Try this code. Press submit and it w...","replycount":"0"},{"threadid":"4675","forumid":"5","forumtitle":"Help","title":"Nested View Objects\/Nested Xml collections","author":"dwebsubmit","lastposter":"Bill Sheppard","lastpost":"1192114189","excerpt":"2 questions in one, \r\nCan you use the xmlReader to read something that looks like this: \r\n\r\n\r\n  \r\n    my title\r\n    This would be a description\r\n    \r\n      \r\n        first\r\n        second\r\n        third\r\n      \r\n    \r\n  \r\n  \r\n    my title\r\n    This would be a description\r\n    \r\n      \r\n        firs...","replycount":"9"},{"threadid":"14941","forumid":"9","forumtitle":"Help","title":"loosing drag and drop handles","author":"bartvde","lastposter":"bartvde","lastpost":"1192113399","excerpt":"Hi people,\r\n\r\ncan somebody please explain to me why I lose the drag and drop handles on my div after it has been moved once? I.e. after moving I cannot move the same div again.\r\n\r\nYou can see it in action at (sorry for the very messy code):\r\n\r\nhttp:\/\/www.osgis.nl\/ext\/examples\/dragndrop\/\r\n\r\nThanks in...","replycount":"0"},{"threadid":"14887","forumid":"5","forumtitle":"Help","title":"ContentPanel with a URL Kills Toolbar","author":"rwilkerson","lastposter":"rwilkerson","lastpost":"1192113072","excerpt":"Hey all -\r\n\r\nI have a container, \"panel-east\" that contains two child divs - \"tlbr-east\" and \"body-east\".  I really want to load the panel's content from a URL, but I can't seem to make that happen without removing the toolbar.  If I remove only the url property from the CP config then the panel loa...","replycount":"2"},{"threadid":"14914","forumid":"5","forumtitle":"Help","title":"About TabPanelItem.setContent param loadScripts true","author":"piskui07","lastposter":"piskui07","lastpost":"1192112831","excerpt":"Hi, \r\ni'm new on ext forum. I'm learnig ext to build my future web-app and trying various example and tutorial. In one of these i've put a grid inside a tab panel.\r\nAll works fine with this code take on tutorial&example section and little modified:\r\nvar tab2 = jtabs.addTab('jtabs-2', \"Ajax Tab 1\"); ...","replycount":"2"},{"threadid":"14879","forumid":"9","forumtitle":"Help","title":"[Ext 2.0] Problem with Converting 1.1 Paginated Grid","author":"smathis","lastposter":"smathis","lastpost":"1192112826","excerpt":"Hi,\r\n\r\nI've been plugging away at this now for a couple of days and I can't seem to get any headway on it.\r\n\r\nOur group is converting a paginated grid that was working in 1.1 to 2.0. But for some reason our pagination is not working. I'm pretty sure it's something really silly, like I'm missing some...","replycount":"4"},{"threadid":"14890","forumid":"9","forumtitle":"Help","title":"Why won't this FormPanel work...?","author":"chidera","lastposter":"chidera","lastpost":"1192112486","excerpt":"Hello,\r\n\r\nI've been struggling for several days now trying to get a simple FormPanel to work.  For now, I need a normal browser submit rather than an AJAX submit, if that's what it's called.\r\n\r\nHere's my code:\r\n\r\n\t\tvar loginForm = new Ext.form.FormPanel({\r\n\t\t\tid: 'mainLoginForm',\r\n\t\t\turl: '\/auth\/ide...","replycount":"3"},{"threadid":"14939","forumid":"5","forumtitle":"Help","title":"data.store & tree","author":"fernando","lastposter":"fernando","lastpost":"1192112404","excerpt":"Hi guy's,\r\n\r\nDoes anyone know how to create a static tree using a store? \r\n\r\nOnce again any suggestions will be much appreciated.","replycount":"0"},{"threadid":"14814","forumid":"7","forumtitle":"Examples and Extras","title":"Ext 2.0a1 Demo Code Editor","author":"NBRed5","lastposter":"Pagebaker","lastpost":"1192112377","excerpt":"This is a demo of an Ext based Code Editor\/IDE I have been building to gain some experience using Ext & Javascript.\r\n\r\nhttp:\/\/www.ext.nbred5.com\r\n\r\nDouble click the file you wish to edit in the Code Browser (Tree).\r\n\r\nI originally started in Ext 1.1.1 however on the release of Ext 2.0 alpha1 I was a...","replycount":"6"},{"threadid":"14865","forumid":"5","forumtitle":"Help","title":"Accessing an Ext.form.Form from "outside"","author":"dante","lastposter":"devnull","lastpost":"1192112306","excerpt":"It is possible to set an ext form's id (or a name) as a config option rather than having it generated automatically? The problem is that I'd like to access the form via javascript.","replycount":"4"},{"threadid":"14919","forumid":"9","forumtitle":"Help","title":"Construction - "web desktop"","author":"scarenci","lastposter":"djliquidice","lastpost":"1192112262","excerpt":"Hello everbory,\r\n\r\n\r\n         I am studing the component web desktop and I would like to know, how I make the layout in one window, because I saw a construction of window with only a component example one tabs or one accordion, but I need to know the both or more in same windows. \r\n\r\n\r\nSomebody can ...","replycount":"3"},{"threadid":"14694","forumid":"9","forumtitle":"Help","title":"EXT2.0 Grids How to achieve the large volume of data turning the pages?","author":"hfzhae","lastposter":"djliquidice","lastpost":"1192112124","excerpt":":\">EXT2.0 Grids How to achieve the large volume of data turning the pages?","replycount":"3"},{"threadid":"14844","forumid":"5","forumtitle":"Help","title":"Combobox, dialog, form and a bit problem","author":"evilized","lastposter":"evilized","lastpost":"1192111735","excerpt":"hi :)\n\ni've a bit problem with a combobox \"loaded from my server with a store\", when i show my dialog, i make a ajax resquest for load the form with information, but in the combo o see the id of a category and not the name :S\n\nany body have an idea???\n\n\nmy comboboix definition:\n\nnew Ext.form.ComboBo...","replycount":"2"},{"threadid":"14937","forumid":"5","forumtitle":"Help","title":"Grid sizes","author":"captainm1uk","lastposter":"captainm1uk","lastpost":"1192111683","excerpt":"Hi All\n \nNow I know this issue is related to extnd but i thought i would ask the question.  When I have a layout with a view in the center region and a west region as a navigator all is well but if i collapse the west region, the view doesn't resize so there is a gap on the right hand size of the pa...","replycount":"0"},{"threadid":"14936","forumid":"9","forumtitle":"Help","title":"Drag and Drop Between Two Grids","author":"Matt","lastposter":"Matt","lastpost":"1192111528","excerpt":"I have already searched all of the 2.0 forums and I can't figure out how to completely implement dragging and dropping between two grids. I have the interface working, but the data does not actually move once dropped. Any advice would greatly be appreciated. You can look at my test site here: http:\/...","replycount":"0"},{"threadid":"14934","forumid":"3","forumtitle":"Bugs","title":"Sample from tutorial isn't work in 2.0-beta1","author":"vladimir","lastposter":"vladimir","lastpost":"1192111333","excerpt":"Gentlemen,\r\nMay be I miss something but sample from this link\r\nhttp:\/\/extjs.com\/learn\/Tutorial:Application_Layout_for_Beginners \r\nisn't work with 2.0-beta1 button has no text. if i use 1.1 everything goes right.\r\n\r\n-vladimir","replycount":"1"},{"threadid":"14845","forumid":"9","forumtitle":"Help","title":"[Ext 2.0a1] Toolbar: how to obtain buttons list ?","author":"DeeZ","lastposter":"DeeZ","lastpost":"1192111167","excerpt":"Hi,\r\n\r\nCertainly a newbie question but how to have the buttons list of a toolbar ?\r\nI add dynamically buttons on a toolbar. I want to avoid to have the same button in the toolbar. And I want to remove them dynamically too.\r\n\r\nThanks.","replycount":"2"},{"threadid":"14820","forumid":"9","forumtitle":"Help","title":"Force a Download","author":"gerb","lastposter":"gerb","lastpost":"1192111036","excerpt":"Hi, \r\n\r\nI was wondering if there is a possibility to force a download from a extjs app with i.e. the connection class. This is my code:\r\n\r\nextjs:\r\n\r\nvar conn = new Ext.data.Connection();\r\n                \r\nconn.request({\r\n    url: 'gateway.php',\r\n    method: 'POST',\r\n    params: {\r\n       'f': 'down...","replycount":"4"},{"threadid":"14740","forumid":"11","forumtitle":"Premium Help","title":"auto populate ComboBox defaults with allQuery and select problem","author":"henryli86","lastposter":"henryli86","lastpost":"1192111018","excerpt":"Hi,\n\nI would like to use ComboBox in a form. The ComboBox has a default list which is dynamic based on the context and usually has only one record and should be selected. The user can type in and do autocompletion if value other than the default is needed.\n\nOne possible solution I can think of is to...","replycount":"6"},{"threadid":"4323","forumid":"6","forumtitle":"Open Discussion","title":"Ext Translations","author":"trbs","lastposter":"amon","lastpost":"1192110380","excerpt":"Extjs is used by many people in many countries, so let's get the translations on the way :D\n\nThere's a complete list to translate in: source\/experimental\/ext-lang-en.js\nRename this file to your language code and start translating ;)\n\nAttach your translation to the forum post !\nPlease do not paste it...","replycount":"137"},{"threadid":"14931","forumid":"11","forumtitle":"Premium Help","title":"[Ext 2.0] Grid Headers - Horizontal Scrolling","author":"Clayton","lastposter":"Clayton","lastpost":"1192110126","excerpt":"Hi all,\n\nI had posted to an old thread regarding this problem, but it looks like it was already buried. I seem to be having an issue with headers not scrolling alongside the rest of the grid. This occurs when using IE7 (Firefox is fine) and when horizontal scrollbars are present.\n\nAs a test case, I ...","replycount":"0"}]});
    0
    Notice the odd four digit hex value preceding the callback function call, and the "0" after it.

    Is my http response missing something?

  10. #10
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    i show only the json txt no header/footer/etc.
    http://extjs.com/forum/topics-browse...tcCallback1002