[CLOSED] Filter store on the server (in code behind)

  1. #1

    [CLOSED] Filter store on the server (in code behind)

    Hello,

    I have a pretty basic example but not quite sure what am I doing wrong!?

    Have a store created in markup with the JSON reader in.


    In a page load event on the server tried something like this:

    
    MyStore.DataSource = MyDataTable
    MyStore.filter("column", "1", True, True)
    MyStore.DataBind()
    Anyway nothing happens, the store is not filtered at all and the gridpanel display all the rows!?

    Thanks in advance.
    Last edited by Daniil; Dec 01, 2010 at 10:09 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Filter method generates javascript method calling only (calls javascript method 'filter' of store). This server side method must be used during DirectEvent only. I guess in your case the store is not loaded yet therefore filtering is not performed

    I suggest to add the following listener to the store
    <Load Handler="this.filter('column', '1', true, true);" Single="true"/>
  3. #3

    Спасибо Влади́мир

    it works, thx.

Similar Threads

  1. Replies: 2
    Last Post: Apr 12, 2012, 5:44 AM
  2. [CLOSED] Server side filter the store
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Sep 26, 2011, 10:30 AM
  3. [CLOSED] Filter a Store on Datarange from Code Behind
    By sisa in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 15, 2011, 2:38 PM
  4. Replies: 0
    Last Post: May 17, 2010, 3:07 AM
  5. remove filter form server code
    By maxdiable in forum 1.x Help
    Replies: 0
    Last Post: Jul 10, 2009, 4:39 AM

Tags for this Thread

Posting Permissions