Esempio n. 1
0
        protected override void CreateChildControls()
        {
            tablePageNumbers  = new Table();
            cellDisplayStatus = new TableCell();
            cellDisplayLinks  = new TableCell();
            //cellDisplayStatus.CssClass = "Normal";
            //cellDisplayLinks.CssClass = "Normal";
            tablePageNumbers.CssClass = String.IsNullOrEmpty(CssClass) ? "PagingTable" : CssClass;
            var intRowIndex = tablePageNumbers.Rows.Add(new TableRow());

            PageNumbers = new Repeater();
            var I = new PageNumberLinkTemplate(this);

            PageNumbers.ItemTemplate = I;
            BindPageNumbers(TotalRecords, PageSize);
            cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;
            //cellDisplayStatus.Width = new Unit("50%");
            cellDisplayLinks.HorizontalAlign = HorizontalAlign.Right;
            //cellDisplayLinks.Width = new Unit("50%");
            var intTotalPages = _totalPages;

            if (intTotalPages == 0)
            {
                intTotalPages = 1;
            }
            var str = string.Format(Localization.GetString("Pages"), CurrentPage, intTotalPages);
            var lit = new LiteralControl(str);

            cellDisplayStatus.Controls.Add(lit);
            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayStatus);
            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayLinks);
        }
Esempio n. 2
0
        protected override void CreateChildControls()
        {
            tablePageNumbers = new System.Web.UI.WebControls.Table();

            tablePageNumbers.Width = new Unit("100%");

            cellDisplayStatus          = new System.Web.UI.WebControls.TableCell();
            cellDisplayLinks           = new System.Web.UI.WebControls.TableCell();
            cellDisplayStatus.CssClass = "Normal";
            cellDisplayLinks.CssClass  = "Normal";

            if (string.IsNullOrEmpty(this.CssClass))
            {
                tablePageNumbers.CssClass = "PagingTable";
            }
            else
            {
                tablePageNumbers.CssClass = this.CssClass;
            }

            int intRowIndex = tablePageNumbers.Rows.Add(new TableRow());

            PageNumbers = new Repeater();
            PageNumberLinkTemplate I = new PageNumberLinkTemplate(this);

            PageNumbers.ItemTemplate = I;
            BindPageNumbers(TotalRecords, PageSize);

            cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;

            cellDisplayStatus.Style.Add(HtmlTextWriterStyle.WhiteSpace, "nowrap");

            cellDisplayLinks.HorizontalAlign = HorizontalAlign.Right;
            //cellDisplayLinks.Width = new Unit ("100%");

            int intTotalPages = TotalPages;

            if (intTotalPages == 0)
            {
                intTotalPages = 1;
            }

            string str = null;

            str = string.Format(Localization.GetString("Pages"), CurrentPage.ToString(), intTotalPages.ToString());
            LiteralControl lit = new LiteralControl(str);

            cellDisplayStatus.Controls.Add(lit);

            tablePageNumbers.Rows [intRowIndex].Cells.Add(cellDisplayStatus);
            tablePageNumbers.Rows [intRowIndex].Cells.Add(cellDisplayLinks);
        }
Esempio n. 3
0
        protected override void CreateChildControls()
        {
            tablePageNumbers           = new Table();
            cellDisplayStatus          = new TableCell();
            cellDisplayLinks           = new TableCell();
            cellDisplayStatus.CssClass = "Normal";
            cellDisplayLinks.CssClass  = "Normal";

            if (String.IsNullOrEmpty(CssClass))
            {
                tablePageNumbers.CssClass = "PagingTable";
                //add some defaults in case the site
                //has a custom css without the PagingTable css
                tablePageNumbers.Width       = new Unit("100%");
                tablePageNumbers.BorderStyle = BorderStyle.Solid;
                tablePageNumbers.BorderWidth = new Unit("1px");
                tablePageNumbers.BorderColor = Color.Gray;
            }
            else
            {
                tablePageNumbers.CssClass = this.CssClass;
            }

            int intRowIndex = tablePageNumbers.Rows.Add(new TableRow());

            PageNumbers = new Repeater();
            PageNumberLinkTemplate I = new PageNumberLinkTemplate(this);

            PageNumbers.ItemTemplate = I;
            BindPageNumbers(TotalRecords, PageSize);

            cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;
            cellDisplayStatus.Width           = new Unit("50%");
            cellDisplayLinks.HorizontalAlign  = HorizontalAlign.Right;
            cellDisplayLinks.Width            = new Unit("50%");
            int intTotalPages = TotalPages;

            if (intTotalPages == 0)
            {
                intTotalPages = 1;
            }

            string         str = string.Format(Localization.GetString("Pages"), CurrentPage, intTotalPages);
            LiteralControl lit = new LiteralControl(str);

            cellDisplayStatus.Controls.Add(lit);

            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayStatus);
            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayLinks);
        }
Esempio n. 4
0
 protected override void CreateChildControls()
 {
     tablePageNumbers = new Table();
     cellDisplayStatus = new TableCell();
     cellDisplayLinks = new TableCell();
     //cellDisplayStatus.CssClass = "Normal";
     //cellDisplayLinks.CssClass = "Normal";
     tablePageNumbers.CssClass = String.IsNullOrEmpty(CssClass) ? "PagingTable" : CssClass;
     var intRowIndex = tablePageNumbers.Rows.Add(new TableRow());
     PageNumbers = new Repeater();
     var I = new PageNumberLinkTemplate(this);
     PageNumbers.ItemTemplate = I;
     BindPageNumbers(TotalRecords, PageSize);
     cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;
     //cellDisplayStatus.Width = new Unit("50%");
     cellDisplayLinks.HorizontalAlign = HorizontalAlign.Right;
     //cellDisplayLinks.Width = new Unit("50%");
     var intTotalPages = _totalPages;
     if (intTotalPages == 0)
     {
         intTotalPages = 1;
     }
     var str = string.Format(Localization.GetString("Pages"), CurrentPage, intTotalPages);
     var lit = new LiteralControl(str);
     cellDisplayStatus.Controls.Add(lit);
     tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayStatus);
     tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayLinks);
 }
		protected override void CreateChildControls ()
		{

			tablePageNumbers = new System.Web.UI.WebControls.Table ();

            tablePageNumbers.Width = new Unit ("100%");

			cellDisplayStatus = new System.Web.UI.WebControls.TableCell ();
			cellDisplayLinks = new System.Web.UI.WebControls.TableCell ();
			cellDisplayStatus.CssClass = "Normal";
			cellDisplayLinks.CssClass = "Normal";

			if (string.IsNullOrEmpty (this.CssClass))
			{
				tablePageNumbers.CssClass = "PagingTable";
			} else
			{
				tablePageNumbers.CssClass = this.CssClass;
			}

			int intRowIndex = tablePageNumbers.Rows.Add (new TableRow ());

			PageNumbers = new Repeater ();
			PageNumberLinkTemplate I = new PageNumberLinkTemplate (this);
			PageNumbers.ItemTemplate = I;
			BindPageNumbers (TotalRecords, PageSize);

			cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;
			
			cellDisplayStatus.Style.Add(HtmlTextWriterStyle.WhiteSpace, "nowrap");
			
			cellDisplayLinks.HorizontalAlign = HorizontalAlign.Right;
			//cellDisplayLinks.Width = new Unit ("100%");
		
			int intTotalPages = TotalPages;
			if (intTotalPages == 0)
				intTotalPages = 1;

			string str = null;
			str = string.Format (DotNetNuke.Services.Localization.Localization.GetString ("Pages"), CurrentPage.ToString (), intTotalPages.ToString ());
			LiteralControl lit = new LiteralControl (str);
			cellDisplayStatus.Controls.Add (lit);

			tablePageNumbers.Rows [intRowIndex].Cells.Add (cellDisplayStatus);
			tablePageNumbers.Rows [intRowIndex].Cells.Add (cellDisplayLinks);
		}
Esempio n. 6
0
        protected override void CreateChildControls()
        {
            tablePageNumbers = new Table();
            cellDisplayStatus = new TableCell();
            cellDisplayLinks = new TableCell();
            cellDisplayStatus.CssClass = "Normal";
            cellDisplayLinks.CssClass = "Normal";

            if (String.IsNullOrEmpty( CssClass ))
            {
                tablePageNumbers.CssClass = "PagingTable";
                //add some defaults in case the site
                //has a custom css without the PagingTable css
                tablePageNumbers.Width = new Unit("100%");
                tablePageNumbers.BorderStyle = BorderStyle.Solid;
                tablePageNumbers.BorderWidth = new Unit("1px");
                tablePageNumbers.BorderColor = Color.Gray;
            }
            else
            {
                tablePageNumbers.CssClass = this.CssClass;
            }

            int intRowIndex = tablePageNumbers.Rows.Add(new TableRow());

            PageNumbers = new Repeater();
            PageNumberLinkTemplate I = new PageNumberLinkTemplate(this);
            PageNumbers.ItemTemplate = I;
            BindPageNumbers(TotalRecords, PageSize);

            cellDisplayStatus.HorizontalAlign = HorizontalAlign.Left;
            cellDisplayStatus.Width = new Unit("50%");
            cellDisplayLinks.HorizontalAlign = HorizontalAlign.Right;
            cellDisplayLinks.Width = new Unit("50%");
            int intTotalPages = TotalPages;
            if (intTotalPages == 0)
            {
                intTotalPages = 1;
            }

            string str = string.Format(Localization.GetString("Pages"), CurrentPage, intTotalPages);
            LiteralControl lit = new LiteralControl(str);
            cellDisplayStatus.Controls.Add(lit);

            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayStatus);
            tablePageNumbers.Rows[intRowIndex].Cells.Add(cellDisplayLinks);
        }