May 14, 2009, 6:14 PM
[CLOSED] Adding a new Store Record - Not a Record object
Hi,
I'm dynamically adding a record to the Store using the new C# AddRecord function IDictionary<string, string> recordData = new Dictionary<string, string>();
Is there any way in which AddRecord can add a Record object to the store rather than an array? It's making it very hard to get the required data out to pass back to the system for actioning.
Cheers
Steve
I'm dynamically adding a record to the Store using the new C# AddRecord function IDictionary<string, string> recordData = new Dictionary<string, string>();
recordData.Add("id", highId);
recordData.Add("parentId", this.parentId.ToString());
recordData.Add("recordTypeId", ((int)this.recordType).ToString());
recordData.Add("addressTitle", addressTitle.Text);
recordData.Add("addressNameNumber", addressNameNumber.Text);
recordData.Add("addressStreet1", addressStreet1.Text);
recordData.Add("addressStreet2", addressStreet2.Text);
recordData.Add("addressTown", addressTown.Text);
recordData.Add("addressCountyState", addressCounty.Text);
recordData.Add("addressCodeZip", addressCodeZip.Text);
recordData.Add("addressCountry", addressCountry.Text);
addressStore.AddRecord(recordData);
If I then look at the DataStore in FireBug, my original records (from the DataBind) are all Record Objects. The new record is an array. This means that when I attempt to get the modified data, Ext.encode will not work on the record.Is there any way in which AddRecord can add a Record object to the store rather than an array? It's making it very hard to get the required data out to pass back to the system for actioning.
Cheers
Steve