protected void Page_PreRender(object sender, EventArgs e) { AuthorizationWorkFlowRepeater.DataSource = new DataView(AuthorizationWorkFlowDetailDataTable, string.Empty, ListFooter.ListOrderBy, DataViewRowState.CurrentRows); AuthorizationWorkFlowRepeater.DataBind(); if (AuthorizationWorkFlowRepeater.Items.Count > 0) { AuthorizationWorkFlowRepeater.Items[0].FindControl("Up").Visible = false; AuthorizationWorkFlowRepeater.Items[AuthorizationWorkFlowRepeater.Items.Count - 1].FindControl("Down").Visible = false; } }
protected void Page_PreRender(object sender, EventArgs e) { DBFilter AuthorizationWorkFlowDetailFilter = new DBFilter(); AuthorizationWorkFlowDetailFilter.add(new Match("AuthorizationWorkFlowID", CurID)); DataTable AuthorizationWorkFlowDetailDataTable = AuthorizationWorkFlowDetailFilter.loadData(dbConn, ListFooter.ListInfo, "*", " FROM " + EAuthorizationWorkFlowDetail.db.dbclass.tableName); AuthorizationWorkFlowRepeater.DataSource = new DataView(AuthorizationWorkFlowDetailDataTable, string.Empty, ListFooter.ListOrderBy, DataViewRowState.CurrentRows); AuthorizationWorkFlowRepeater.DataBind(); //if (AuthorizationWorkFlowRepeater.Items.Count > 0) //{ // AuthorizationWorkFlowRepeater.Items[0].FindControl("Up").Visible = false; // AuthorizationWorkFlowRepeater.Items[AuthorizationWorkFlowRepeater.Items.Count - 1].FindControl("Down").Visible = false; //} }