Results 1 to 4 of 4

Thread: Sending Parameters

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
      0  

    Exclamation Answered: Sending Parameters

    Hello!
    well i am trying to improve my self in extjs , now what i want to do is , i have a grid , a button and a textbox , now i want that after writing the recid in textbox and pressing the button my grid will show all the records of that id , or you can say i want to show conditional records in my grid , for this i have to send parameter to my webservice (i am using asp.net/c#) , so that i can get the filtered records , someone tell me that i have to send the parameters through store , and someone tell me that i have to send the parameters in the buttons handler event by using the post method and after that reload the store , but i tried both methods and i failed .

    please guide me and help me , because you people are more experienced in it and all of you are my teachers..
    Best Records.

    M.Waqas Aslam

  2. If all your records are loaded in the store, you can use filters (filtering on the client side):
    Code:
    store.clearFilter();
    store.filter([
        Ext.create('Ext.util.Filter', {property: "recid", value: textbox.getValue(), root: 'data'}),
    ]);
    you migh need some records that are not loaded in the store, you can do this..
    and then filter the store on the server with the given parameter
    Code:
    store.load({
      params : {
        recid : textfield.getValue();
      }
    });

  3. #2
    chramer's Avatar
    Join Date
    Feb 2011
    Location
    Chisinau, Moldova
    Posts
    316
    Answers
    64
    Vote Rating
    33
      0  

    Default

    If all your records are loaded in the store, you can use filters (filtering on the client side):
    Code:
    store.clearFilter();
    store.filter([
        Ext.create('Ext.util.Filter', {property: "recid", value: textbox.getValue(), root: 'data'}),
    ]);
    you migh need some records that are not loaded in the store, you can do this..
    and then filter the store on the server with the given parameter
    Code:
    store.load({
      params : {
        recid : textfield.getValue();
      }
    });

  4. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    125
    Answers
    7
    Vote Rating
    3
      0  

    Default

    you can use a config remoteFilter on the store. Then it uses the same api (filter function on store for the filtering) and therefor its sending a filter parameter to the server (a hash with property value).

  5. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
      0  

    Exclamation Thanks

    thanks both of you for your time and help , i am really very thankful to you .
    (thread is solved.)
    God Bless You

    Regards

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •