/// <summary> /// Raises the <see cref="E:System.Web.UI.Control.Init"/> event. /// </summary> /// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param> protected override void OnInit(EventArgs e) { // // We have to have a ToolkitScriptManager on the page but, we can't require that the // developer add one to the page because this might be a SharePoint environment // so, we added this code to Page.Init to add a ToolkitScriptManager if there isn't one. // Page.Init += delegate(object sender, EventArgs e_Init) { if (ToolkitScriptManager.GetCurrent(Page) == null) { ToolkitScriptManager sMgr = new ToolkitScriptManager { EnablePageMethods = true }; if (Page.Form == null) { throw new HttpException("Control must be located inside of a <form> tag."); } Page.Form.Controls.AddAt(0, sMgr); } }; // if (!Page.IsCallback) { m_GridView = new GridView(); m_HistoryData = new HistoryDataSource(); m_HistoryData.QueryInfo = QueryInfo; m_GridView.DataSource = m_HistoryData; m_GridView.AutoGenerateColumns = false; } if (!DesignMode) { // // Add our stylesheet // HtmlLink link = new HtmlLink(); link.Href = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MVPSI.JAMSWeb.Controls.Resources.JAMSLoadingStyles.css"); link.Attributes.Add("type", "text/css"); link.Attributes.Add("rel", "stylesheet"); Page.Header.Controls.Add(link); // // Add our stylesheet // HtmlLink link2 = new HtmlLink(); link2.Href = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MVPSI.JAMSWeb.Controls.SubmitDialog.JAMSSubmitStyles.css"); link2.Attributes.Add("type", "text/css"); link2.Attributes.Add("rel", "stylesheet"); Page.Header.Controls.Add(link2); } base.OnInit(e); }
public HistoryDataSourceView(HistoryDataSource owner, string viewName) : base(owner, viewName) { m_Owner = owner; }