[CLOSED] Way to tell store to reaload data but only if circumstances are met

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Quote Originally Posted by Daniil View Post
    Please provide us with the Store's configuration. A solution can depend on it.
    I get it:)

    Here's my configuration for now:
    string DisplayField = "Name";
    string ValueField = "Id";
    string EmptyText = "-- empty --";
    string EmptyValue = 0;
    Ext.Net.ComboBox combo = new Ext.Net.ComboBox();
    Ext.Net.Store store = new Ext.Net.Store();
                    store.ID = this.ID + "_Store";
                    Ext.Net.JsonReader reader = new JsonReader();
                    combo.DisplayField = DisplayField;
                    combo.ValueField = ValueField;
                    combo.EmptyText = EmptyText;
                    combo.EmptyValue = EmptyValue;
                    reader.Fields.AddRange(new List<RecordField>{new RecordField(ValueField, RecordFieldType.Int), new RecordField(DisplayField, RecordFieldType.String)});
                    store.SortInfo.Direction = SortDirection.ASC;
                    store.SortInfo.Field = DisplayField;
                    store.Reader.Add(reader);
                    reader.IDProperty = ValueField;
                    Ext.Net.HttpProxy proxy = new Ext.Net.HttpProxy();
                    proxy.Url = "~/ComboHandler.cs";
                    proxy.Method = HttpMethod.POST;
                    proxy.Timeout = 10000;
                    store.Proxy.Add(proxy);
                    store.AutoLoad = false;
                    store.BaseParams["session_name_combobox"] = store.ID;
                    string jsonParams = JSON.Serialize(searchParams);
                    store.BaseParams[store.ID + "_searchparams"] = jsonParams;
                    combo.TriggerAction = TriggerAction.All;
    1 more issue happend how to load only 1 value to combobox on server side:
    object o = Activator.CreateInstance(type,new object[]{1,null};//type is System.Type of my BLL Object
    ((MMPControls.Web.ComboBoxWithAddFeature)control.Value).Store.AddRecord(o);//here I got exception JsonSerializationException do I need serialize this 'o' element?
    Last edited by ViDom; Dec 12, 2012 at 2:28 PM.

Similar Threads

  1. Replies: 0
    Last Post: Apr 22, 2012, 9:39 AM
  2. Replies: 1
    Last Post: Mar 08, 2012, 2:52 PM
  3. Replies: 5
    Last Post: May 17, 2011, 9:10 AM
  4. Replies: 5
    Last Post: Nov 26, 2010, 5:39 PM
  5. [CLOSED] Data Store deriving invalid data variable name
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 15, 2009, 12:31 PM

Tags for this Thread

Posting Permissions