/// <summary> /// Initialize /// </summary> /// <param name="component"></param> /// <remarks> /// Initialize /// </remarks> public override void Initialize(IComponent component) { this.deluxeGrid = (DeluxeGrid)component; base.Initialize(component); SetViewFlags(ViewFlags.DesignTimeHtmlRequiresLoadComplete, true); SetViewFlags(ViewFlags.TemplateEditing, true); }
/// <summary> /// 设置绑定对应控件的分页属性 /// </summary> /// <param name="objControl"></param> /// <param name="controlMode"></param> /// <param name="pageSize"></param> /// <returns></returns> /// <remarks> /// 设置绑定对应控件的分页属性 /// </remarks> public bool SetBoundControlPagerSetting(object objControl, DataListControlType controlMode, int pageSize) { bool bl = true; if (objControl == null || pageSize <= 0) { return(false); } switch (controlMode) { case DataListControlType.DeluxeGrid: DeluxeGrid dg = (DeluxeGrid)objControl; dg.PageSize = pageSize; break; case DataListControlType.GridView: GridView gv = (GridView)objControl; gv.PageSize = pageSize; break; case DataListControlType.DataGrid: DataGrid dgOld = (DataGrid)objControl; dgOld.PageSize = pageSize; break; default: bl = false; break; } return(bl); }
protected override void InitDialogContent(Control container) { base.InitDialogContent(container); this.serverConfirmButton = (Button)this.FindControlByID("serverConfirmButton", true); this.processGrid = (DeluxeGrid)this.FindControlByID("ProcessDescInfoDeluxeGrid", true); this.statistics = (HtmlGenericControl)this.FindControlByID("statistics", true); if (this.statistics != null) { this.statistics.InnerText = this.GetStatisticsText(); } processGrid.RowDataBound += DeluxeGridRowDataBound; this.serverConfirmButton.Click += new EventHandler(serverConfirmButton_Click); ObjectDataSource objectDataSource = container.FindControl <ObjectDataSource>(true); objectDataSource.Selecting += new ObjectDataSourceSelectingEventHandler(objectDataSource_Selecting); objectDataSource.Selected += new ObjectDataSourceStatusEventHandler(objectDataSource_Selected); if (Page.IsPostBack == false) { ExecuteQuery(); } }
private void BindDataGrid(DeluxeGrid dataGrid) { List <RuntimeParameterInfo> source = new List <RuntimeParameterInfo>(); GetProcessParameters(this.CurrentProcess, source); dataGrid.DataSource = source; dataGrid.DataBind(); }
protected override void InitDialogContent(Control container) { base.InitDialogContent(container); this._ProcessParametersGrid = (DeluxeGrid)this.FindControlByID("RuntimeParametersInfoDeluxeGrid", true); this._ProcessParametersGrid.PageIndexChanging += new System.Web.UI.WebControls.GridViewPageEventHandler(ProcessParametersGrid_PageIndexChanging); string editorTitle = Translator.Translate(Define.DefaultCulture, "编辑流程参数"); HtmlInputButton editBtn = (HtmlInputButton)this.FindControlByID("editBtn", true); if (editBtn != null) { editBtn.Visible = CurrentProcess != null && WfClientContext.IsProcessAdmin(DeluxeIdentity.CurrentUser, CurrentProcess); editBtn.Attributes["onclick"] = string.Format("$find(\"{0}\").showEditParametersDialog();", this.ClientID); } this._refreshButton = (Button)this.FindControlByID("refreshButton", true); }
protected override void InitDialogContent(Control container) { base.InitDialogContent(container); this.serverConfirmButton = (Button)this.FindControlByID("serverConfirmButton", true); ddlEnabled = (DropDownList)this.FindControlByID("ddlEnabled", true); dropdownExtender = (TextBoxDropdownExtender)this.FindControlByID("dropdownExtender", true); btnSearch = (Button)this.FindControlByID("btnSearch", true); this.processGrid = (DeluxeGrid)this.FindControlByID("ProcessDescInfoDeluxeGrid", true); txtApplicationName = (TextBox)this.FindControlByID("txtApplicationName", true); txtProgramName = (TextBox)this.FindControlByID("txtProgramName", true); txtProcessKey = (TextBox)this.FindControlByID("txtProcessKey", true); txtProcessName = (TextBox)this.FindControlByID("txtProcessName", true); btnSearch.Click += new EventHandler(btnSearch_Click); this.serverConfirmButton.Click += new EventHandler(serverConfirmButton_Click); ObjectDataSource objectDataSource = container.FindControl <ObjectDataSource>(true); objectDataSource.Selecting += new ObjectDataSourceSelectingEventHandler(objectDataSource_Selecting); objectDataSource.Selected += new ObjectDataSourceStatusEventHandler(objectDataSource_Selected); if (!Page.IsPostBack) { dropdownExtender.DataSource = WfProcessDescriptionCategoryAdapter.Instance.Load(p => p.AppendItem("ID", "", "<>")); dropdownExtender.DataValueField = "Name"; dropdownExtender.DataTextField = "Name"; dropdownExtender.DataBind(); this.processGrid.MultiSelect = this.MultiSelect; //ddlEnabled.Items.Add(new ListItem("请选择", "")); //ddlEnabled.Items.Add(new ListItem("是", "1")); //ddlEnabled.Items.Add(new ListItem("否", "0")); ExecuteQuery(); } }
private void ProcessParametersGrid_PageIndexChanging(object sender, System.Web.UI.WebControls.GridViewPageEventArgs e) { this._ProcessParametersGrid = (DeluxeGrid)this.FindControlByID("RuntimeParametersInfoDeluxeGrid", true); this._ProcessParametersGrid.PageIndex = e.NewPageIndex; }