protected virtual void SetHideHeaders(bool hide) { RequestManager.EnsureDirectEvent(); this.AddScript("{0}.headerCt.setVisible({1});", this.ClientID, JSON.Serialize(!hide)); this.DoComponentLayout(); }
public virtual void RefreshView() { RequestManager.EnsureDirectEvent(); string template = "{0}.getView().refresh(true);"; this.AddScript(template, this.ClientID); }
public void SetValue(float?eqValue) { RequestManager.EnsureDirectEvent(); string value = "{eq:".ConcatWith(eqValue.HasValue ? JSON.Serialize(eqValue.Value) : "undefined", "}"); this.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), value); }
public void AddTask(Task task) { RequestManager.EnsureDirectEvent(); task.Owner = this; task.Listeners.Update.Owner = this; task.DirectEvents.Update.Owner = this; this.Call("addTask", new JRawValue(new ClientConfig().Serialize(task))); }
public void SetValue(bool?value) { RequestManager.EnsureDirectEvent(); if (this.Plugin != null) { this.Plugin.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(value)); } }
public virtual void ConcealTrigger(int index) { RequestManager.EnsureDirectEvent(); this.Triggers[index].HideTrigger = true; string template = "{0}.triggers[{1}].hide();"; this.AddScript(template, this.ClientID, index); }
public virtual void ShowTrigger(int index) { RequestManager.EnsureDirectEvent(); this.Triggers[index].HideTrigger = false; string template = "{0}.triggers[{1}].show();"; this.AddScript(template, this.ClientID, index); }
public void SetValue(string value) { RequestManager.EnsureDirectEvent(); if (this.ParentGrid != null) { this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(value)); } }
public void UpdateOptions(string[] options) { RequestManager.EnsureDirectEvent(); if (this.ParentGrid != null) { this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).updateOptions({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), JSON.Serialize(options)); } }
public void ClearFilters() { RequestManager.EnsureDirectEvent(); GridPanel grid = this.ParentComponent as GridPanel; if (grid != null) { grid.AddScript("{0}.getFilterPlugin().clearFilters();", grid.ClientID); } }
public void SetValue(DateTime?onValue) { RequestManager.EnsureDirectEvent(); if (this.ParentGrid != null) { string value = "{on:".ConcatWith(onValue.HasValue ? DateTimeUtils.DateNetToJs(onValue.Value) : "undefined", "}"); this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value); } }
public void SetValue(DateTime?onValue) { RequestManager.EnsureDirectEvent(); if (this.Plugin != null) { string value = "{on:".ConcatWith(onValue.HasValue ? JSON.Serialize(onValue.Value, JSON.ScriptConverters) : "undefined", "}"); this.Plugin.AddScript("{0}.getFilter({1}).setValue({2});", this.Plugin.ClientID, JSON.Serialize(this.DataIndex), value); } }
public void SetValue(float?greaterThanValue, float?lessThanValue) { RequestManager.EnsureDirectEvent(); if (this.ParentGrid != null) { string value = "{gt:".ConcatWith(greaterThanValue.HasValue ? JSON.Serialize(greaterThanValue.Value) : "undefined", ",lt:", lessThanValue.HasValue ? JSON.Serialize(lessThanValue.Value) : "undefined", "}"); this.ParentGrid.AddScript("{0}.getFilterPlugin().getFilter({1}).setValue({2});", this.ParentGrid.ClientID, JSON.Serialize(this.DataIndex), value); } }
/// <summary> /// Adds a filter to the collection and observes it for state change. /// </summary> /// <param name="filter">A filter configuration</param> public virtual void AddFilter(GridFilter filter) { RequestManager.EnsureDirectEvent(); this.Call("addFilter", new ClientConfig().Serialize(filter)); }
public virtual void ClearFilters() { RequestManager.EnsureDirectEvent(); this.Call("clearFilters"); }
/// <summary> /// /// </summary> public virtual void RemoveAll() { RequestManager.EnsureDirectEvent(); this.Call("removeAll"); }
/// <summary> /// Apply sort /// </summary> public virtual void ApplySort() { RequestManager.EnsureDirectEvent(); this.Call("applySort"); }
/// <summary> /// Apply grouping /// </summary> /// <param name="alwaysFireChange">fire datachanged event</param> public virtual void ApplyGrouping(bool alwaysFireChange) { RequestManager.EnsureDirectEvent(); this.Call("applyGrouping", alwaysFireChange); }
/// <summary> /// Groups the data by the specified field. /// </summary> /// <param name="field">The field name by which to sort the store's data</param> public virtual void GroupBy(string field) { RequestManager.EnsureDirectEvent(); this.Call("groupBy", field); }
public virtual void RemoveByText(string text) { RequestManager.EnsureDirectEvent(); this.Call("removeByText", text); }
/// <summary> /// Remove record by id /// </summary> /// <param name="index">index</param> public virtual void RemoveRecord(int index) { RequestManager.EnsureDirectEvent(); this.Call("remove", new JRawValue("{0}.getAt({1})".FormatWith(this.ClientID, index))); }
/// <summary> /// Remove record by id /// </summary> /// <param name="id">id</param> public virtual void RemoveRecord(object id) { RequestManager.EnsureDirectEvent(); this.Call("remove", new JRawValue("{0}.getById({1})".FormatWith(this.ClientID, JSON.Serialize(id)))); }
public void UpdateData() { RequestManager.EnsureDirectEvent(); this.AddScript("{0}={1};", this.ClientID, JSON.Serialize(this.Items)); }
public virtual void RemoveByIndex(int index) { RequestManager.EnsureDirectEvent(); this.Call("removeByIndex", index); }
public void AddKeyBinding(KeyBinding keyBinding) { RequestManager.EnsureDirectEvent(); this.Call("addBinding", keyBinding); }
/// <summary> /// Clears any existing grouping and refreshes the data using the default sort. /// </summary> public virtual void ClearGrouping() { RequestManager.EnsureDirectEvent(); this.Call("clearGrouping"); }
public void RegisterColumnPlugins() { RequestManager.EnsureDirectEvent(); this.Call("initColumnPlugins", new JRawValue(this.GetColumnPlugins()), true); }
public virtual void RemoveByValue(string value) { RequestManager.EnsureDirectEvent(); this.Call("removeByValue", value); }
public virtual void UpdateRecordField(object id, string dataIndex, object value) { RequestManager.EnsureDirectEvent(); this.AddScript("{0}.getById({1}).set({2},{3});", this.ClientID, JSON.Serialize(id), JSON.Serialize(dataIndex), JSON.Serialize(value)); }
public virtual void UpdateRecordId(object id, object newId, bool silent) { RequestManager.EnsureDirectEvent(); this.Call("updateRecordId", id, newId, silent); }