Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8901925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:28:58+00:00 2026-06-15T01:28:58+00:00

I have form and grid. the user must enter data in form fields then

  • 0

I have form and grid. the user must enter data in form fields then display related records in the grid.

I want to implement a search form, e.g: user will type the name and gender of the student,
then will get a grid of all students have the same name and gender.

So, I use Ajax to send form fields value to PHP and then create a json_encode which will be used in grid store.

I am really not sure if my idea is good. But I haven’t found another way to do that.

The problem is there is a mistake in my store but I couldn’t figure out what it is. I get this error:
Uncaught TypeError: Cannot read property 'buffered' of undefined

My View:

{
  xtype: 'panel',
  layout: "fit",
  id: 'searchResult',
  flex: 7,
  title: '<div style="text-align:center;"/>SearchResultGrid</div>',
  items: [{
    xtype: 'gridpanel',
    store: 'advSearchStore',
    id: 'AdvSearch-grid',
    columns: [{
        xtype: 'gridcolumn',
        dataIndex: 'name',
        align: 'right',
        text: 'name'
      }, {
        xtype: 'gridcolumn',
        dataIndex: 'gender',
        align: 'right',
        text: 'gender'
      }
    ],
    viewConfig: {
      id: 'Arr',
      emptyText: 'noResult'
    },
    requires: ['MyApp.PrintSave_toolbar'],
    dockedItems: [{
      xtype: 'PrintSave_tb',
      dock: 'bottom',
    }]
  }]
}

My Controller:

.
.
.
xmlhttp.open("GET","AdvSearch.php?search_name="+search_name,true);
xmlhttp.send(null); 

My PHP script:

if (!$con) {
    throw new Exception("Error in connection to DB");
}

$query ="SELECT name, gender FROM students  WHERE name ILIKE '%$search_name%' ";
$result = pg_query($query); 

while ($row = pg_fetch_array($result)) {
   $Arr[] = array('name' => $row[0], 'gender' => $row[1]);
}

$searchResult_list = array();
$searchResult_list['success'] = true;
$searchResult_list['Arr'] = $Arr;

$searchResult_list['totalCount'] = count( $searchResult_list['Arr'] );

echo json_encode($searchResult_list); 

if (!$result) 
    die("Error in query: " . pg_last_error());

pg_close($con);

My Store, Model:

Ext.define('AdvSearchPost', {
  extend: 'Ext.data.Model',
  proxy: {
    type: 'ajax',
    url: 'AdvSearch.php',
    reader: {
      type: 'json',
      root: 'Arr',
      totalProperty: 'totalCount'
    }
  },
  fields: [{
      name: 'name'
    }, {
      name: 'type_and_cargo'
    }
  ]
});
advSearchStore = Ext.create('Ext.data.Store', {
  pageSize: 10,
  model: 'AdvSearchPost'
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:28:59+00:00Added an answer on June 15, 2026 at 1:28 am

    Well it is just a typo of your storename.

    The error Uncaught TypeError: Cannot read property 'buffered' of undefinedonly indicates that the store could not be bound. It may be a bit misleading.

    Try the grid with either

    store: advSearchPost
    

    or

    store: Ext.StoreMgr.lookup('AdvSearchPost') // if in any form a controller takes care about your store 
    

    and it will work.

    Edit

    I guess you haven’t any controller so I recommend you to create your store like this

    Ext.create('Ext.data.Store', {
       pageSize: 10,
       model: 'AdvSearchPost',
       storeId: 'AdvSearchPost'
    });
    

    That will enable you to receive the store by the StoreManager from everywhere (after it is created). That will also enable the last statement to work without any controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form and grid. the user must enter data in form fields then
I have a grid and when the user closes the form, I want to
I have form where are 2 input fields and then i have dynamic dataTables
i have form with user data to input and javascript ajax to send information
I have a entry form. Below it, I want to show a grid containing
I have a problem with search form. I use date-time picker for user to
I have a form with a grid and I want to pass info from
I am trying to design a form where the user can search records to
I have a window with a search form at the top and grid at
I have a user control (form) inside a user control (grid) with a Validator

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.