public void LoadResultSet(InsightGridArg args) { if (args.ListType == GridListType.LIST) { rgList.Visible = true; dlDetails.Visible = false; dlDetails.DataSource = null; rgList.DataSource = null; rgList.PageSize = this.PageSize; rgList.DataSource = ResultSet; if (args.BindData) { rgList.DataBind(); } } else { rgList.Visible = false; dlDetails.Visible = true; dlDetails.DataSource = null; rgList.DataSource = null; dlDetails.PageSize = this.PageSize; dlDetails.DataSource = ResultSet; dlDetails.DataBind(); } }
public void LoadResultSet(InsightGridArg args) { if (args.ListType == GridListType.LIST) { rgList.Visible = true; dlDetails.Visible = false; dlDetails.DataSource = null; rgList.DataSource = null; rgList.PageSize = this.PageSize; //rgAccounts.VirtualItemCount = this.VirtualItemCount; rgList.DataSource = ResultSet; if (args.BindData) { rgList.DataBind(); } //divListView.Visible = true; //divDetailView.Visible = false; } else { rgList.Visible = false; dlDetails.Visible = true; dlDetails.DataSource = null; rgList.DataSource = null; dlDetails.PageSize = this.PageSize; dlDetails.DataSource = ResultSet; dlDetails.DataBind(); //divListView.Visible = false; //divDetailView.Visible = true; } }
void GetAddressResults(InsightGridArg e) { int count = 0; _view.ResultSet = new Insight.Services.AccountServices().GetAddressesByAccountID(GetCurrentItemReference <Account>().ID); _view.VirtualItemCount = count; _view.LoadResultSet(e); }
void _view_OnGetItems(object sender, InsightGridArg e) { if (e.ListType == 0) { e.ListType = GridListType.LIST; } GetItemResults(e); }
void OnGetAccounts(object o, InsightGridArg e) { if (e.ListType == 0) { e.ListType = GridListType.LIST; } GetAccountsResults(e); }
void GetItemResults(InsightGridArg e) { int count = 0; _view.ResultSet = GetCurrentItemReference <ClientContact>().ContactEmail; _view.VirtualItemCount = count; _view.LoadResultSet(e); }
void GetAccountsResults(InsightGridArg e) { int count = 0; _view.ResultSet = new Insight.Services.AccountServices().GetAllAccounts(_view.CurrentPageIndex, _view.PageSize, out count); _view.VirtualItemCount = count; _view.LoadResultSet(e); }
protected void NeedDataSource(object o, GridNeedDataSourceEventArgs e) { var args = new InsightGridArg(); args.BindData = false; if (this.OnGetItems != null) { this.OnGetItems(this, args); } }
protected void DetailsNeedDataSource(object o, RadListViewNeedDataSourceEventArgs e) { var args = new InsightGridArg(); args.BindData = false; args.ListType = this.ListType; if (this.OnGetItems != null) { this.OnGetItems(this, args); } }
public void LoadResultSet(InsightGridArg args) { rgAccounts.DataSource = null; rgAccounts.PageSize = this.PageSize; //rgAccounts.VirtualItemCount = this.VirtualItemCount; rgAccounts.DataSource = ResultSet; if (args.BindData) { rgAccounts.DataBind(); } }
protected void GridPageSizeChanged(object o, EventArgs e) { var args = new InsightGridArg(); args.ListType = CurrentListType; args.BindData = true; args.PageSize = Convert.ToInt16(((RadComboBox)((RadToolBarItem)rtbList.FindButtonByCommandName("GridPageSize")).FindControl("ddlGridPageSize")).SelectedValue); if (this.OnPageSizeChanged != null) { this.OnPageSizeChanged(this, args); } }
void GetItemResults(InsightGridArg e) { // if the current item type is account, then load only contacts associated with that account...otherwise load all contacts. if (!IsInsert <Account>()) { _view.ResultSet = new Insight.Services.AccountServices().GetAllContactsByAccountID(GetCurrentItemReference <Account>().ID); _view.LoadResultSet(e); } else { int count = 0; _view.ResultSet = new Insight.Services.AccountServices().GetAllContacts(_view.CurrentPageIndex, _view.PageSize, out count); _view.VirtualItemCount = count; _view.LoadResultSet(e); } }
protected void ButtonClicked(object o, RadToolBarEventArgs e) { switch (e.Item.Text) { case "Create New...": if (this.OnCreateNewItem != null) { this.OnCreateNewItem(this, EventArgs.Empty); } break; case "Export": if (this.OnExport != null) { this.OnExport(this, EventArgs.Empty); } break; case "List": var args = new InsightGridArg(); CurrentListType = GridListType.LIST; args.ListType = CurrentListType; args.BindData = true; args.PageSize = Convert.ToInt16(((RadComboBox)((RadToolBarItem)rtbList.FindButtonByCommandName("GridPageSize")).FindControl("ddlGridPageSize")).SelectedValue); ((RadToolBarButton)((RadToolBarItem)rtbList.FindButtonByCommandName("DetailView"))).Checked = false; ((RadToolBarButton)((RadToolBarItem)rtbList.FindButtonByCommandName("ListView"))).Checked = true; if (this.OnListTypeChanged != null) { this.OnListTypeChanged(this, args); } break; case "Detail": args = new InsightGridArg(); CurrentListType = GridListType.DETAIL; args.ListType = CurrentListType; args.BindData = true; args.PageSize = Convert.ToInt16(((RadComboBox)((RadToolBarItem)rtbList.FindButtonByCommandName("GridPageSize")).FindControl("ddlGridPageSize")).SelectedValue); ((RadToolBarButton)((RadToolBarItem)rtbList.FindButtonByCommandName("DetailView"))).Checked = true; ((RadToolBarButton)((RadToolBarItem)rtbList.FindButtonByCommandName("ListView"))).Checked = false; if (this.OnListTypeChanged != null) { this.OnListTypeChanged(this, args); } break; } }
protected void Page_Load(object sender, EventArgs e) { base.SelfRegister(this); if (this.LoadView != null) { this.LoadView(this, EventArgs.Empty); } if (!IsPostBack) { if (this.OnGetAccounts != null) { var args = new InsightGridArg(); args.BindData = true; this.OnGetAccounts(this, args); } } }
void Presenter_MessageReceived(object sender, InsightGridArg e) { _view.ListType = e.ListType; _view.PageSize = e.PageSize; GetAddressResults(e); }
void _view_OnGetItems(object sender, InsightGridArg e) { GetAddressResults(e); }
void Presenter_MessageReceived(object sender, InsightGridArg e) { _view.PageSize = e.PageSize; GetAccountsResults(e); }