Opened 9 years ago

Closed 9 years ago

#10255 closed defect (invalid)

DataGrid should refresh when setStore is called with new store

Reported by: jdev Owned by: Nathan Toone
Priority: high Milestone: tbd
Component: General Version: 1.4.0b
Keywords: DataGrid setStore Cc:
Blocked By: Blocking:

Description

I create a new store and assign it to a Datagrid using setStore. The datagrid does not call the fetch on the data store and thus does not retrieve the data or re-render. If I explicitly call fetch in the data store prior to calling setStore the data is retrieved but the DataGrid? still does not re-render. I have created an example by stripping out most of the code & HTML from my page. Clicking the "New Task" button should assign a new store and refresh the grid but it doesn't. My ultimate goal is to place the DataGrid? inside of an accordian container and only create and assign the store when that content pane is shown and the data is needed.

Attachments (2)

SA_GridUpdateTest.html (3.6 KB) - added by jdev 9 years ago.
Sample HTML & javascript
task_data.json (549 bytes) - added by jdev 9 years ago.
Sample Data

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by jdev

Attachment: SA_GridUpdateTest.html added

Sample HTML & javascript

Changed 9 years ago by jdev

Attachment: task_data.json added

Sample Data

comment:1 Changed 9 years ago by dante

Milestone: 1.4tbd
Owner: changed from anonymous to Nathan Toone

comment:2 Changed 9 years ago by Nathan Toone

Resolution: invalid
Status: newclosed

In your test case, you are making an assignment...rather than calling:

grid.setStore=(new_store, query, null);

You should call:

grid.setStore(new_store, query null);

(remove the equals "=" sign).

Also - if you pass the query to setStore, there is no need to call setQuery afterwards.

Note: See TracTickets for help on using tickets.