We have been working hard and are happy to announce the release of Ext.NET 3.1.Click here
for a full list of changes and make sure you visit our
download page
now to get the latest version.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Ext.Net Store.loadData

I tried to make an initialization of Store with some initial data loaded by scripts. Weird is that I coded some server-side scripts but rendered client scripts like the following. It generates errors. Any ideas?

RE: Ext.Net Store.loadData

Hi Daniil,

Thanks for your reply. The code you appended works fine if I erase the reader settings (Root and TotalProperty). I think I have serval points to add on this post for the reason why I think it is more likely a bug.

The class definition which you can find as "TwoStoreReponseData" is a sub-class derived from "StoreResponseData" whose "ToString()" function produces a Json format with root name "data" and "total" property. StoreReponseData is a usful class I use in the project to generate Json-based MVC action results (transmitting a zipped store data).

That's why I want to generalize this format to let the rest of my store definitions confine with this usage convention.

- On previous version (0.8.2) afore server-side script works fine and the rendered JS scripts are correctly mapped to store.loadData(jsonObject, isAppended). But 1.0 version renders another format which is store.loadData(jsonString, isAppended). To translate jsonString to jsonObject, I think a wrap "Ext.decode()" is required. If not, reader's getRoot function will generate an error. That's the one I mentioned at the original post saying some errors occurred.

- At 1.0 version, StoreReponseData.ToString() changed the totalProperty name which is from "totalCount" to "total". Other implementation of it remains the same. So when I changed the way I initialize the store with the following:

It works fine! That means the Json format is still accepted by the store and reader definition.

- Furtherly when I double check the way DataBind or SetDataFromJson, I found they use different mapping to client-side JS script render, comparing with LoadData. They both use Ext.data.PagingMemoryProxy to create a Json block proxy for reader to read.

So in conclusion, StoreReponseData is producing a correct Json string and Store reader still accept the way to read the string if reader and root are correctly specified. Problematic is LoadData, which is at server-side should render a client-side loadData function without quoting the string object put to server-side function call.

RE: Ext.Net Store.loadData

Hello, cleve!

Maybe you are right, maybe not:) I think the creators of this toolkit can answer on this question - it's a bug or not? Perhaps, they have already answered on it because this topic is moved to Help from Bug forum:)