May 06, 2013, 10:24 AM
[CLOSED] Store error 'Please define Reader for the Proxy (store's Reader is used if proxy is undefined)'
Hi,
Here is my configuration of store for combobox remote loading by handler:
Am I doing something wrong?
Thanks,
ViDom
Here is my configuration of store for combobox remote loading by handler:
store = new Ext.Net.Store {ID = this.ID + "_Store"};
Ext.Net.JsonReader reader = new JsonReader {TotalProperty = "TotalRecords",Root = "data",IDProperty = "Id"};
Ext.Net.ComboBox combo = new Ext.Net.ComboBox();
combo.DisplayField = "Name";
combo.ValueField = "Id";
combo.EmptyText = "-- empty --";
combo.EmptyValue = 0;
combo.ForceSelection = true;
combo.Editable = true;
combo.TypeAhead = false;
combo.ListConfig = new BoundList {LoadingText = "Loading..."};
combo.MinChars = 1;
Model model = new Model();
model.Fields.AddRange(new List<ModelField> { new ModelField("Id", ModelFieldType.Int), new ModelField("Name", ModelFieldType.String) });
store.Model.Add(model);
//DataSorter dataSorter = new DataSorter {Property = "Name", Direction = SortDirection.ASC};
//store.Sorters.Add(dataSorter);
Ext.Net.AjaxProxy proxy = new Ext.Net.AjaxProxy {Url = "~/ComboHandler.ashx"};
proxy.ActionMethods.Read = HttpMethod.POST;
proxy.Timeout = 120000;
proxy.Reader.Add(reader);// here I have add Reader for proxy
store.Proxy.Add(proxy);
store.AutoLoad = false;
store.RemoteSort = true;
store.Reader.Add(reader);
combo.TriggerAction = TriggerAction.All;
}
store.WarningOnDirty = false;
combo.Store.Add(store);
So I add Reader to proxy and still getting this exception.Am I doing something wrong?
Thanks,
ViDom
Last edited by Daniil; May 09, 2013 at 3:57 AM.
Reason: [CLOSED]