The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

theartfuldodger (23) [Avatar] Offline
#1
I couldn't find an example of this situation in the book but hope somebody has a solution. I am reloading an editorgrid store each time the user clicks on a new case. Everything seems fine as far as the object it's trying to load and the load succeeds, but no data appears from the reload. The insert does produce data on the grid however. Weird.

Here's the button code that triggers the action:

{
text : 'Payment Calculations',
handler : function() {
var centerRegion = Ext.getCmp('centerRegion');
centerRegion.removeAll();
centerRegion.add(paymentsGrid);
centerRegion.doLayout();
centerRegion.show();
if (updateForm.caseId != "") {
var record = caseStore.getAt(updateForm.idx);
jsonStr = localStorage.getItem(record.get("Case"));
if (jsonStr == null) {
var newRecord = new paymentsStore.recordType({
});
paymentsStore.insert(0, newRecord);
}
else
{
jsonObj = Ext.util.JSON.decode(jsonStr);
paymentsStore.load();
}
}
}
},
theartfuldodger (23) [Avatar] Offline
#2
Re: Editorgrid Not Reloading Properly
solved the problem using inserts vs a load.

however, on subsequent returns to the grid, after the viewport center panel has displayed other forms, the fields are no longer editable for some reason.

i did a removeAll on the store prior to inserting the new detail records for the new master.

any ideas?
theartfuldodger (23) [Avatar] Offline
#3
Re: Editorgrid Not Reloading Properly
This is driving me NUTZ!!!

What could possibly cause the editorgrid to disable editing cells on subsequent displays?

This initial display always works fine.

Anybody?

HELP!!!!!
jesus.garcia (463) [Avatar] Offline
#4
Re: Editorgrid Not Reloading Properly
Why are you removing the grid or even reloading the store? Why not just add the record?
theartfuldodger (23) [Avatar] Offline
#5
Re: Editorgrid Not Reloading Properly
I have a viewport. The west region has a list of cases. The center region is for displaying content. The content varies according to menu selection option and case selected.

I display forms and grids in the variable content area. The forms work fine. The editorgrid only works (permits editing) on the initial display.

I could use tabs or cards but I would prefer to do it this way if possible.

I would greatly appreciate any suggestions. Maybe this is impossible to do with Ext, I don't know.

Thanks.
jesus.garcia (463) [Avatar] Offline
#6
Re: Editorgrid Not Reloading Properly
It's possible. The problem I have is that you're describing the reloading of a store, yet you're removing an editable grid. to me, that's not reloading.
theartfuldodger (23) [Avatar] Offline
#7
Re: Editorgrid Not Reloading Properly
I have to remove the grid if the user requests a form to display in that content area.

Then, if they request to see the grid again, perhaps for a different case, then I have to display the grid again and of course reload the store.

Again, I am working with a variable content area in the center region of a viewport..
theartfuldodger (23) [Avatar] Offline
#8
Re: Editorgrid Not Reloading Properly
Suppose I did something like this and pointed contentPanel to the various forms and grids as required?:

var vp = new Ext.Viewport({
layout : 'border',
boxMaxWidth: 980,
defaults : {
frame : true,
split : true
},
items : [
{
region : 'north',
height : 40,
items : mainTBar
},
{
region : 'west',
width : 375,
items : {}
},
{
region : 'center',
width : 605,
xtype : 'container',
layout : 'fit',
id : 'content',
items : contentPanel
}
]
});
theartfuldodger (23) [Avatar] Offline
#9
Re: Editorgrid Not Reloading Properly
One other thing. I am actually not reloading the store. I am removingALL and inserting the new records. I suspect that the problem lies in the relationship between the store and the grid.
jesus.garcia (463) [Avatar] Offline
#10
Re: Editorgrid Not Reloading Properly
that should not prevent editing.

I"m very confused. Can you post a full example that can demonstrate this issue? Please use pastebin.com
theartfuldodger (23) [Avatar] Offline
#11
Re: Editorgrid Not Reloading Properly
Here is the link:



I am basically trying to alternate between displaying a form and the payments grid.

Message was edited by:
theartfuldodger
theartfuldodger (23) [Avatar] Offline
#12
Re: Editorgrid Not Reloading Properly
You can test the app at

Message was edited by:
theartfuldodger
theartfuldodger (23) [Avatar] Offline
#13
Re: Editorgrid Not Reloading Properly
Anybody?
jesus.garcia (463) [Avatar] Offline
#14
Re: Editorgrid Not Reloading Properly
First piece of advice, do not have your ENTIRE application inside of Ext.onReady();
jesus.garcia (463) [Avatar] Offline
#15
Re: Editorgrid Not Reloading Properly
Ron, are you part of the Ext JS community? You will get tons more eyes there, whereas here, I'm pretty much the only person supporting this forum.
theartfuldodger (23) [Avatar] Offline
#16
Re: Editorgrid Not Reloading Properly
I have posted on the Sencha forum too, yes.
jesus.garcia (463) [Avatar] Offline
#17
Re: Editorgrid Not Reloading Properly
no response from the community? smilie
theartfuldodger (23) [Avatar] Offline
#18
Re: Editorgrid Not Reloading Properly
Nope. I have found similar questions posted in the past but the responses are either non-existant or wrong.
theartfuldodger (23) [Avatar] Offline
#19
Re: Editorgrid Not Reloading Properly
The other day you asked for a program listing and I provided you one. Now you imply you haven't the time and suggest "I try the community".

I have tried the community. Many other people have the same question and no answer has been forthcoming.

You want people to get interested in Ext and buy your little book?

Answer the questions.

You don't want to answer my question (or can't)?

Then stop wasting my time.
jesus.garcia (463) [Avatar] Offline
#20
Re: Editorgrid Not Reloading Properly
I help lots of people in many different places *for free*! I suggested you try the community so you could get more eyes on your problem. There is absolutely no need to be rude.