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?
2 Answers
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.

- 2,375
- 1
- 13
- 21
-
Thanks for the clarification Geoffrey, makes a lot more sense how you put it. The client side 'id' was always a bit weird for me so I'd like to know that I could set it at databind to something meaningful to the row server side, IDProperty makes a lot more semantic sense personally! – dougajmcdonald Sep 17 '11 at 21:39
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.

- 19,231
- 12
- 56
- 89