Esempio n. 1
0
        public virtual void AddItem(string text, object value)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.addItem({1}, {2});";

            this.AddScript(template, this.ClientID, JSON.Serialize(text), JSON.Serialize(value, null, true));
        }
Esempio n. 2
0
        public virtual void DeleteSelected()
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.deleteSelected();";

            this.AddScript(template, this.ClientID);
        }
Esempio n. 3
0
        public virtual void AddRecord(IDictionary <string, object> values)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.addRecord({1});";

            this.AddScript(template, this.ClientID, JSON.Serialize(values, null, true));
        }
Esempio n. 4
0
        public virtual void RefreshView()
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.getView().refresh(true);";

            this.AddScript(template, this.ClientID);
        }
Esempio n. 5
0
        public virtual void InsertRecord(int index, IDictionary <string, object> values)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.insertRecord({1}, {2});";

            this.AddScript(template, this.ClientID, index, JSON.Serialize(values, null, true));
        }
Esempio n. 6
0
        public virtual void RemoveByText(string text)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.removeByText({1});";

            this.AddScript(template, this.ClientID, JSON.Serialize(text));
        }
Esempio n. 7
0
        public virtual void InsertItem(int index, string text, object value)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.insertItem({1}, {2}, {3});";

            this.AddScript(template, this.ClientID, index, JSON.Serialize(text), JSON.Serialize(value, null, true));
        }
Esempio n. 8
0
        public virtual void RemoveByIndex(int index)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.removeByIndex({1});";

            this.AddScript(template, this.ClientID, index);
        }
Esempio n. 9
0
        public virtual void RemoveByField(string field, object value)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.removeByField({1}, {2});";

            this.AddScript(template, this.ClientID, JSON.Serialize(field), JSON.Serialize(value, null, true));
        }
Esempio n. 10
0
        public virtual void ConcealTrigger(int index)
        {
            Ext.EnsureAjaxEvent();
            this.Triggers[index].HideTrigger = true;
            string template = "{0}.triggers[{1}].hide();";

            this.AddScript(template, this.ClientID, index);
        }
Esempio n. 11
0
        public virtual void ShowTrigger(int index)
        {
            Ext.EnsureAjaxEvent();
            this.Triggers[index].HideTrigger = false;
            string template = "{0}.triggers[{1}].show();";

            this.AddScript(template, this.ClientID, index);
        }
Esempio n. 12
0
 public void SetValue(string value)
 {
     Ext.EnsureAjaxEvent();
     if (this.ParentGrid != null)
     {
         this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(value));
     }
 }
Esempio n. 13
0
 public void SetValue(DateTime?onValue)
 {
     Ext.EnsureAjaxEvent();
     if (this.ParentGrid != null)
     {
         string value = string.Concat("{on:", onValue.HasValue ? DateTimeUtils.DateNetToJs(onValue.Value) : "undefined", "}");
         this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value);
     }
 }
Esempio n. 14
0
 public void SetValue(float?eqValue)
 {
     Ext.EnsureAjaxEvent();
     if (this.ParentGrid != null)
     {
         string value = string.Concat("{eq:", eqValue.HasValue ? JSON.Serialize(eqValue.Value) : "undefined", "}");
         this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value);
     }
 }
Esempio n. 15
0
        public void ClearFilters()
        {
            Ext.EnsureAjaxEvent();
            GridPanel grid = this.ParentComponent as GridPanel;

            if (grid != null)
            {
                grid.AddScript("{0}.getFilterPlugin().clearFilters();", grid.ClientID);
            }
        }
Esempio n. 16
0
 public void Update()
 {
     Ext.EnsureAjaxEvent();
     this.AddScript("{0}={1};", this.ClientID, JSON.Serialize(this.Items));
 }
Esempio n. 17
0
 internal virtual void SetHideHeaders(bool hide)
 {
     Ext.EnsureAjaxEvent();
     this.AddScript("{0}.getView().mainHd.setDisplayed({1});", this.ClientID, JSON.Serialize(!hide));
 }
Esempio n. 18
0
 public void AddKeyBinding(KeyBinding keyBinding)
 {
     Ext.EnsureAjaxEvent();
     this.AddScript("{0}.addBinding({1});", this.ClientID, JSON.Serialize(keyBinding));
 }
Esempio n. 19
0
 public void RegisterColumnPlugins()
 {
     Ext.EnsureAjaxEvent();
     this.AddScript("{0}.initColumnPlugins({1}, true);", this.ClientID, this.GetColumnPlugins());
 }