Ext.Net.GridPanel.OnBeforeClientInit C# (CSharp) Method

OnBeforeClientInit() private method

private OnBeforeClientInit ( Observable sender ) : void
sender Observable
return void
        protected override void OnBeforeClientInit(Observable sender)
        {
            base.OnBeforeClientInit(sender);

            if (this.StoreID.IsNotEmpty() && this.Store.Primary != null)
            {
                throw new Exception(string.Format("Please do not set both the StoreID property on {0} and <Store> inner property at the same time.", this.ID));
            }
            
            this.CheckColumns();

            if (this.SelectionMemoryProxy && this.MemoryIDField.IsEmpty() && (this.Store.Primary != null || this.StoreID.IsNotEmpty()))
            {
                Store store = this.Store.Primary??(ControlUtils.FindControl(this, this.StoreID) as Store);

                if (store != null && store.Reader.Count > 0)
                {
                    string id = store.Reader.Reader.IDField;
            
                    if (id.IsNotEmpty())
                    {
                        this.MemoryIDField = id;
                    }
                }
            }
        }