View Full Version : Detail Grid not clearing on form reset

28 Feb 2010, 2:59 PM
I have a form that has a Detail grid in a Master-Detail record with data binding from a lookup grid.

If I choose an item on the lookup grid, it loads header-type info into the form and loads the 1:n detail data into an EditorGrid.

If I press "reset" on my form, the form clears and the Selected item in my lookup grid deselects, bit my Grid is not clearing.

The way I am trying to clear the grid is by sending a query that returns 0 records back to the detail store, in effect clearing it.

Firebug shows the POST returning 0 records, yet the grid is not refreshing even with a store.reload().

Can anyone help me out here, I would think this is pretty straightforward. I am NOT looking for free code, so it would be nice to get a response to a question for once on this forum......

//RESET function
text: 'Reset'
,handler: function(){

//CODE to SEND NULL QUERY <--- this is returning 0 rows in my JSON

function(sm, rowIndex, record) {
{params: {'poID': 0}}

//END of Application

28 Feb 2010, 9:01 PM
Not quite following you fully, but possibly you need to refresh the GridView after making a change.


28 Feb 2010, 10:30 PM
Reloading the item store? But why?

Don't you want to remove All records from it?

1 Mar 2010, 5:06 AM
I tried removeAll at first but got a ton of errors in Firebug so I went down the path of returning a null query to the store.

1 Mar 2010, 5:08 AM
So you didn't debug at all. You just gave up?

Errors have meaning.

1 Mar 2010, 5:10 AM
I can replicate again to share

1 Mar 2010, 5:15 AM
Why not fix the errors?

1 Mar 2010, 5:38 AM
Before the reset, after the reset and the firebug repsonses after reset. Now I remember why I moved away from removeAll (before beer drinking event)

If you look at the second Firebug, when using removeAll, it posts a "destroy" action back to the php/database. I do not want to remove the records from the database, just clear my view.

1 Mar 2010, 6:00 AM
Check the param of removeAll

1 Mar 2010, 6:02 AM
Didn't send a param. I will try that. But I am afraid I will remove records from DB....cross fingers