Пример #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));
        }
Пример #2
0
        public virtual void DeleteSelected()
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.deleteSelected();";

            this.AddScript(template, this.ClientID);
        }
Пример #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));
        }
Пример #4
0
        public virtual void RefreshView()
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.getView().refresh(true);";

            this.AddScript(template, this.ClientID);
        }
Пример #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));
        }
Пример #6
0
        public virtual void RemoveByText(string text)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.removeByText({1});";

            this.AddScript(template, this.ClientID, JSON.Serialize(text));
        }
Пример #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));
        }
Пример #8
0
        public virtual void RemoveByIndex(int index)
        {
            Ext.EnsureAjaxEvent();
            string template = "{0}.removeByIndex({1});";

            this.AddScript(template, this.ClientID, index);
        }
Пример #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));
        }
Пример #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);
        }
Пример #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);
        }
Пример #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));
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #15
0
        public void ClearFilters()
        {
            Ext.EnsureAjaxEvent();
            GridPanel grid = this.ParentComponent as GridPanel;

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