[CLOSED] Store error 'Please define Reader for the Proxy (store's Reader is used if proxy is undefined)'

  1. #1

    [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:
    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]
  2. #2
    Just remove
    store.Reader.Add(reader);
  3. #3
    Quote Originally Posted by Vladimir View Post
    Just remove
    store.Reader.Add(reader);
    I just missed it. Could you please explain then when should I add reader to store?
  4. #4
    Quote Originally Posted by ViDom View Post
    Could you please explain then when should I add reader to store?
    If a Store has no Proxy.

Similar Threads

  1. Replies: 0
    Last Post: Feb 21, 2013, 7:26 PM
  2. store's Reader is used if proxy is undefined
    By yash.kapoor in forum 2.x Help
    Replies: 14
    Last Post: Oct 26, 2012, 3:46 AM
  3. MVC [error] store proxy treepanel on host
    By mr_al_one in forum 2.x Help
    Replies: 1
    Last Post: Oct 17, 2012, 10:52 AM
  4. Sugestion about Ext.net.Store and ur Reader
    By marcelorosait in forum 1.x Help
    Replies: 0
    Last Post: Feb 17, 2012, 6:54 PM
  5. Store.Reader.Count = 1?
    By jsemple in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 23, 2010, 8:05 PM

Tags for this Thread

Posting Permissions