Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Local ListGrid with filter: filter won't work

    UPDATE: version 7.0rc2 (built 2009-05-30)

    Hi,
    I'm trying to create a local listgrid (with static data) and add filtering into it.
    Here's my code:
    Code:
    isc.ListGrid.create({
    	ID: "objectsList",
    	showHeader: false,
    	showFilterEditor: true,
    	filterOnKeypress: true,
    	dataProperties: {
    		fetchMode: 'local',
    		useClientFiltering: true
    	},
    	fields: [
    		{ name: "entityType" }
    	],
    	data: [
    		{ entityType: "Employee" },
    		{ entityType: "Department" }
    	]
    });
    Filter is shown but no filtering occurs. Where's my mistake?
    Last edited by EvilShrike; 15 Jul 2010, 10:20.

    #2
    Excuse me, but is this question too lame to answer?

    I can clarify why do I need "static listgrid". I have an area in a main page layout holding a list of objects which don't change in the application life (it's names of entities).
    So I what my server page (aspx) which returns main page client layout creates ListGrid with data. Without the need to fetch them by additional query.
    Make sence?
    That's because I fill data property of ListGrid.
    Everything is fine except filtering. I want to allow this list to be filtered.
    Could you please tell how to achieve that? Thanks!

    Comment


      #3
      Here's the answer:
      Code:
      isc.DataSource.create({
      	ID:"entityTypesDS",
      	fields: [ { name: "title" } ],
      	clientOnly: true,
      	testData: [{"entityType":"Department","title":"Отдел"}]
       });
      
      isc.ListGrid.create({
      	showFilterEditor: true,
      	filterOnKeypress: true,
      	dataProperties: {
      		fetchMode: 'local',
      		useClientFiltering: true
      	},
      	fields: [ { name: "title" } ],
      	dataSource: "entityTypesDS",
      	autoFetchData: true,
      });

      Comment


        #4
        Thanks for the answer, it works great wit a RestDataSource which returns few rows. I didn't want the overhead of filtering server side.

        Comment

        Working...
        X