Hybrid View
-
29 Dec 2010 11:54 PM #1
Grid Filter Problem
Grid Filter Problem
While trying to use a filter in a grid, the following thing happened
the grid keeps on loading and following error comes
this.proxy is undefined
here is the code:
Code:var filtersForAttrbuteGrid = new Ext.grid.GridFilters({ filters:[ { type: 'string', dataIndex: 'AttributeName' }, { type: 'list', dataIndex: 'DataType', options: attrDataList }, { type: 'list', dataIndex: 'Range', options: attrRangeList }, { type: 'list', dataIndex: 'UseType', options : attrSectionorUseList }, { type: 'list', dataIndex: 'ApplicableFor', options : attrApplicableList } ]}); var pagingBar = new Ext.PagingToolbar({ id:'attr_pagingBar', pageSize: attr_PageSize, store: simpleStore, displayInfo: true, displayMsg: 'Displaying Attributes {0} - {1} of {2}', paramNames:{ start:'start', limit:'pageSize', sort:'sort', dir:'dir' }, listeners:{ change : function(toolBar, event){ var startRowNum = (event.activePage - 1) * attr_PageSize; //alert('startRowNum '+startRowNum); renumberRows(simpleStore, startRowNum); } /* beforechange : function(pagingToolBar, event){ //alert("Inside beforechange = "+event.start); varstart = event.start; }*/ }, plugins : filtersForAttrbuteGrid, emptyMsg: "No Attribute to display" }); var grid = new Ext.grid.GridPanel({ id:att_grid_panel_id, ds: simpleStore, cm: cm, sm: new Ext.grid.RowSelectionModel({ singleSelect: true }), stripeRows: true, viewConfig: { forceFit: true }, layout:'fit', title: 'Attibute Editor', loadMask: {msg: 'Loading ...'}, tbar : tBar, bbar : pagingBar, plugins : filtersForAttrbuteGrid });
-
30 Dec 2010 12:35 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
Is simpleStore filled with local data or remote data?
If it's local data, then GridFilters needs to be configured with local:true.
-
30 Dec 2010 1:17 AM #3
I am using a local data,but when i put local:true in the GridFilters,the entire grid gets disappeared
here is the code:
var myData = [
['Text Attribute','Text','Exact','Match','All Cases','1001'],
['Text Attribute','Text','Inexact','Confirmatory','Specific Cases','1002'],
['Long Text Attribute','Long Text','N/A','Solution','All Cases','1000'],
['Link Attribute','Link / Attachment','N/A','Solution','Specific Cases','1003','http://localhost:8080/consult/home-page.jsp'],
['List Attribute','List','OENUM','Confirmatory','All Cases','1004'],
['List Attribute','List','UENUM','Solution','Specific Cases','1005'],
['List Attribute','List','List of UENUM','Solution','All Cases','1006'],
['List Attribute','List','YES/NO','Solution','Specific Cases','1007'],
['Integer Attribute','Integer','Un-Bounded','Solution','All Cases','1008'],
['Integer Attribute','Integer','Lower Bounded','Match','Specific Cases','1009','12'],
['Integer Attribute','Integer','Upper Bounded','Confirmatory','All Cases','1010','67'],
['Integer Attribute','Integer','Fully Bounded','Match','Specific Cases','1011','12','67'],
['Integer Attribute','Integer','Between','Solution','All Cases','1012'],
['Real Attribute','Real','Un-Bounded','Solution','Specific Cases','1013','Un-Bounded'],
['Real Attribute','Real','Lower Bounded','Match','All Cases','1014','15'],
['Real Attribute','Real','Upper Bounded','Solution','Specific Cases','1015','69'],
['Real Attribute','Real','Fully Bounded','Solution','All Cases','1016','15','69'],
['Tree Attribute','Tree','Entire Tree','Match','All Cases','1017'],
['Tree Attribute','Tree','Folder','Solution','Specific Cases','1018'],
['Date Attribute','Date','After','Solution','All Cases','1019'],
['Date Attribute','Date','Before','Match','Specific Cases','1020'],
['Date Attribute','Date','On','Solution','All Cases','1021'],
['Date Attribute','Date','Around','Confirmatory','Specific Cases','1022']
];
simpleStore = new Ext.data.Store({
reader: new Ext.data.ArrayReader({}, [
{name: 'AttributeName'},
{name: 'DataType'},
{name: 'Range'},
{name: 'UseType',convert: function(v, rec) {
if (rec[3] == 'Match') return 0;
if (rec[3] == 'Confirmatory') return 1;
return 2;
}},
{name: 'ApplicableFor',convert: function(v, rec) {
if (rec[4] == 'All Cases') return 1;
return 0;
}},
{name: 'attId'},
{name: 'LowerBound'},
{name: 'UpperBound'}
])
});
simpleStore.loadData(myData);
-
30 Dec 2010 1:35 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
You can't use a PagingToolbar with a Store with local data.
You would need a PagingStore for that (see User Extensions forum).
Similar Threads
-
Filter Grid Render Problem
By codingJoe in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 1 Dec 2010, 11:45 PM -
[FNR] [2.2.0] Grid Filter Problem
By micgala in forum Ext GWT: Bugs (2.x)Replies: 6Last Post: 6 Sep 2010, 7:32 AM -
Problem in Applying Grid-Filter
By zeeshanhanif in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 26 May 2009, 9:22 PM -
FIREFOX 3 problem FILTER GRID
By imoise in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 21 Jan 2009, 2:42 AM -
Problem with filter grid
By mntek in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 3 May 2008, 5:15 AM


Reply With Quote