That's great. I updated Coolite on my system and I have the RemoveAll now. It is not performingproperly, so I must be missing something.
The store starts out populated with one record, and I want the user to click the "Add new" button to clear the contents of the store and populate it with a new, mostly blank, record.
This is what I am doing, but it gives me a syntax error in the statement "return eval("("+json+')');" in some dynamically generated code. Below are the relevant code snippets. What am I missing? Thanks.
<?xml:namespace prefix = ext /><ext:Store id=storeOneDenial runat="server">
</ext:Store>
<ext:Store runat="server"> protected void addNew(object sender, AjaxEventArgs e)
{
storeOneDenial.RemoveAll();
IDictionary<string, string> recordData = new Dictionary<string, string>();
recordData.Add("Primary_ID","");
recordData.Add("Statement_ID", "New Statement");
recordData.Add("IsActive", "");
recordData.Add("Applies_All", "");
recordData.Add("GroupID", "");
recordData.Add("Effective_On", "");
recordData.Add("Statement", "");
recordData.Add("Appliesto", "");
recordData.Add("status", "");
storeOneDenial.AddRecord(recordData);
Panel0.Reload();
Panel0.Expand();
}</ext:Store>
<ext:Store runat="server"></script></ext:Store>
<ext:Store runat="server">
</ext:Store><ext:Store runat="server">
<ext:Store ID="storeOneDenial" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Primary_ID" Type="Int" />
<ext:RecordField Name="Statement_ID" Type="String" />
<ext:RecordField Name="IsActive" Type="Boolean" />
<ext:RecordField Name="Applies_All" Type="Int" />
<ext:RecordField Name="GroupID" Type="Int" />
<ext:RecordField Name="Effective_On" Type="Date" />
<ext:RecordField Name="Statement" Type="String" />
<ext:RecordField Name="Appliesto" Type="String" />
<ext:RecordField Name="status" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<DataChanged Handler="var record = this.getAt(0)||{};#{Panel0}.getForm().loadRecord(record);" />
</Listeners>
</ext:Store>
<ext:ToolbarButton ID="AddButton" runat="server" Text="Add new" StandOut="true" Icon="Add">
<AjaxEvents>
<Click OnEvent="addNew">
<EventMask ShowMask="true" />
</Click>
</AjaxEvents>
</ext:ToolbarButton>
</ext:Store>