public static ExecuteEverytimeWhenShown ( jQueryObject element, System.Action callback, bool callNowIfVisible ) : void | ||
element | jQueryObject | |
callback | System.Action | |
callNowIfVisible | bool | |
return | void |
public static void TriggerLayoutOnShow(jQueryObject element) { LazyLoadHelper.ExecuteEverytimeWhenShown(element, () => { element.TriggerHandler("layout"); }, true); }
public DataGrid(jQueryObject container, TOptions opt = null) : base(container, opt) { var self = this; this.element.AddClass("s-DataGrid").Html(""); this.element.AddClass("s-" + this.GetType().Name); this.element.AddClass("require-layout").Bind("layout", delegate { self.Layout(); }); Title = GetInitialTitle(); var buttons = GetButtons(); if (buttons != null) { CreateToolbar(buttons); } this.slickContainer = CreateSlickContainer(); this.view = CreateView(); this.slickGrid = CreateSlickGrid(); if (UsePager()) { CreatePager(); } BindToSlickEvents(); BindToViewEvents(); if (buttons != null) { CreateToolbarExtensions(); } UpdateDisabledState(); if (PopulateWhenVisible()) { LazyLoadHelper.ExecuteEverytimeWhenShown(element, () => self.RefreshIfNeeded(), false); if (element.Is(":visible")) { view.Populate(); } } else { view.Populate(); } }
protected void InitialPopulate() { var self = this; if (PopulateWhenVisible()) { LazyLoadHelper.ExecuteEverytimeWhenShown(element, () => self.RefreshIfNeeded(), false); if (element.Is(":visible")) { view.Populate(); } } else { view.Populate(); } }