2

I'm learning how to use Coolite at the moment. I'm trying to use the Store element but I don't know what the ReaderID attribute of the JsonReader does?

4

2 回答 2

2

The .ReaderID property is a little confusing. Here's the definition:

Name of the property within a row object that contains a record identifier value. Defaults to id

Basically, its the name of property in the data item which should be used as the "ID" for that row.

For example, if your 'Customer' object has a "CustomerID" property, then you should set the .ReaderID property to "CustomerID".

FYI, as of Ext.NET v1.x, the .ReaderID property has been renamed to .IDProperty.

More information available at (client-side docs):

http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.data.JsonReader&member=idProperty

Hope this helps.

于 2011-09-15T17:10:57.597 回答
0

Without checking specifically I would assume that the 'ReaderID' property has the same benefits as any 'ID' property, in that it gives a unique reference to the element.

This is often so that you can find it by the ID and perform functions directly upon a specific instance, rather than finding it by type or having to loop through all the items on a page and locate the specific instance you're after.

于 2011-09-15T09:33:40.067 回答