[CLOSED] Store Filter Not Updating Grid

  1. #1

    [CLOSED] Store Filter Not Updating Grid

    Hi,

    I'm having trouble getting a store filter to update my grid.

    My store code:

    <ext:Store runat="server" ID="storeClientEvidence" AutoLoad="false">
            <Reader>
                <ext:JsonReader Root="data">
                    <Fields>
                        <ext:RecordField Name="Id" />
                        <ext:RecordField Name="DocumentName" />
                        <ext:RecordField Name="AttacmentId" />
                        <ext:RecordField Name="ExpiresAfterMonths" />
                        <ext:RecordField Name="HasExpiryDate" />
                        <ext:RecordField Name="MaxEvidenceAgeMonths" />
                        <ext:RecordField Name="NeverExpires" />
                        <ext:RecordField Name="ProofOfBoth" />
                        <ext:RecordField Name="ProofOfAddress" />
                        <ext:RecordField Name="ProofOfName" />
                        <ext:RecordField Name="SortOrder" />
                        <ext:RecordField Name="Active" />
                        <ext:RecordField Name="Reference" />
                        <ext:RecordField Name="ClientAccountId" />
                        <ext:RecordField Name="DocumentExpiryDate" Type="Date" />
                        <ext:RecordField Name="DocumentIssuedDate" Type="Date" />
                        <ext:RecordField Name="DocumentSuppliedDate" Type="Date" />
                        <ext:RecordField Name="ModifiedBy" />
                        <ext:RecordField Name="ModifiedDate" Type="Date" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
    My filter code:

    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true">
                            <Listeners>
                                <RowSelect  Handler="var s = gridEvidenceSummary.getStore();s.clearFilter(true);s.filter('ClientAccountId', record.data.Id);" />
                            </Listeners>
                        </ext:RowSelectionModel>
                    </SelectionModel>
    Whilst no error is thrown, the filter doesn't reflect on the grid rows at all. Am I doing something wrong?

    Thanks.

    EDIT: I should point out, the RowSelect event is firing from a second grid, not the one that I want to apply the filters to.
    Last edited by Daniil; May 23, 2012 at 3:48 PM. Reason: [CLOSED]
  2. #2
    Hi,

    How does the second Store configured which you filter?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    How does the second Store configured which you filter?
    Sorry, the store snippet I gave is for the store I am trying to filter. The other store only provides the ID to filter against. The code for the store I get the ID from (NOT the store I am trying to filter), is :

        
    <ext:Store runat="server" ID="storeClientAccounts" AutoLoad="false" IgnoreExtraFields="true">
            <Reader>
                <ext:JsonReader IDProperty="Id" Root="data">
                    <Fields>
                        <ext:RecordField Name="Id" />
                        <ext:RecordField Name="AccountTypeId" />
                        <ext:RecordField Name="Title" />
                        <ext:RecordField Name="FirstNames" />
                        <ext:RecordField Name="Surname" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
  4. #4
    What are the types of bound data to the main Store Id and filtered Store ClientAccountId?
  5. #5
    Quote Originally Posted by Daniil View Post
    What are the types of bound data to the main Store Id and filtered Store ClientAccountId?
    They are both integers.
  6. #6
    Please try to explicitly set up
    Type="Int"
    for both RecordFields.

    Does it help?
  7. #7
    Quote Originally Posted by Daniil View Post
    Please try to explicitly set up
    Type="Int"
    for both RecordFields.

    Does it help?
    It is working now, thank you.

Similar Threads

  1. Help! Updating Store with complex data...
    By maxiom in forum 1.x Help
    Replies: 1
    Last Post: Aug 06, 2012, 8:49 AM
  2. [CLOSED] Store Filter not reflected in Grid
    By GLD in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Nov 29, 2011, 10:15 AM
  3. Replies: 5
    Last Post: Jun 10, 2011, 6:35 PM
  4. [CLOSED] Data Store not updating record mapping from codebehind
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 08, 2010, 4:42 PM
  5. Updating GridPanel Store in AjaxEvent
    By niceguymattx in forum 1.x Help
    Replies: 2
    Last Post: Mar 10, 2010, 5:36 AM

Posting Permissions