当前位置: 首页>>代码示例>>C#>>正文


C# WebControls.DataGridPageChangedEventArgs类代码示例

本文整理汇总了C#中System.Web.UI.WebControls.DataGridPageChangedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DataGridPageChangedEventArgs类的具体用法?C# DataGridPageChangedEventArgs怎么用?C# DataGridPageChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DataGridPageChangedEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了DataGridPageChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: dgResult_PageIndexChanged

 protected void dgResult_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
 {
     string strSql = TextSql.Text.Trim();
     dgResult.DataSource = DataHelper.ExecuteDataset(CommandType.Text, strSql, null);
     dgResult.CurrentPageIndex = e.NewPageIndex;
     dgResult.DataBind();
 }
开发者ID:haokeyy,项目名称:fahister,代码行数:7,代码来源:ExecSql.aspx.cs

示例2: PageChanged

        /// <summary>
        /// Rebind control 
        /// </summary>
        protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
        {
            //reset index
            searchList.CurrentPageIndex = e.NewPageIndex;

            //get category id
            string keywordKey = Request.QueryString["keywords"];

            //ProductList list = ProductList.NewList();
            var list = new List<Product>();
            foreach (Product product in ProductList.GetAll())
            {
                bool isResult = product.Name.ToLowerInvariant().Contains(keywordKey.ToLowerInvariant()) ||
                                product.Description.ToLowerInvariant().Contains(keywordKey.ToLowerInvariant());

                if (isResult)
                {
                    list.Add(product);
                }
            }

            //bind data
            searchList.DataSource = list;
            searchList.DataBind();
        }
开发者ID:codesmithtools,项目名称:Framework-Samples,代码行数:28,代码来源:SearchControl.ascx.cs

示例3: dgMain_PageIndexChanged

        protected void dgMain_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            dgMain.CurrentPageIndex = e.NewPageIndex;

            dgMain.DataSource = CreateDataSource();
            dgMain.DataBind();
        }
开发者ID:kenlefeb,项目名称:aonawaresyslog,代码行数:7,代码来源:Default.aspx.cs

示例4: GridItemList_PageIndexChanged

 protected void GridItemList_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
 {
     GridItemList.CurrentPageIndex = e.NewPageIndex;
     _count = (Utils.CIntDef(GridItemList.CurrentPageIndex, 0) * GridItemList.PageSize);
     GridItemList.DataSource = Session["AdItemList"] as DataTable;
     GridItemList.DataBind();
 }
开发者ID:htphongqn,项目名称:nidushealth.com,代码行数:7,代码来源:email_ads_list.aspx.cs

示例5: PageChanged

        protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
        {
            products.CurrentPageIndex = e.NewPageIndex;

            // Get the category from the query string
            // string categoryKey = Request["categoryId"];
            string categoryKey = WebComponents.CleanString.InputText(Request["categoryId"], 50);

            // Check to see if the contents are in the Data Cache
            if(Cache[categoryKey] != null){
                // If the data is already cached, then used the cached copy
                products.DataSource = (IList)Cache[categoryKey];
            }else{
                // If the data is not cached, then create a new products object and request the data
                Product product = new Product();
                IList productsByCategory = product.GetProductsByCategory(categoryKey);
                // Store the results of the call in the Cache and set the time out to 12 hours
                Cache.Add(categoryKey, productsByCategory, null, DateTime.Now.AddHours(12), Cache.NoSlidingExpiration , CacheItemPriority.High, null);
                products.DataSource = productsByCategory;
            }

            // Bind the data to the control
            products.DataBind();
            // Set the label to be the query parameter
            lblPage.Text = categoryKey;
        }
开发者ID:GreatQiuWei,项目名称:PetShop,代码行数:26,代码来源:Category.aspx.cs

示例6: CartPageChanged

 protected void CartPageChanged(object sender, DataGridPageChangedEventArgs e)
 {
     // (re)bind the data when the page changes
     cart.CurrentPageIndex = e.NewPageIndex;
     cart.DataSource = myCart.GetCartItems();
     cart.DataBind();
 }
开发者ID:GreatQiuWei,项目名称:PetShop,代码行数:7,代码来源:Checkout.aspx.cs

示例7: PageChanged

        protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
        {
            products.CurrentPageIndex = e.NewPageIndex;

            // Get the search terms from the query string
            string searchKey = WebComponents.CleanString.InputText(Request["keywords"], 100);

            if (searchKey != ""){

                // Create a data cache key
                string cacheKey = "search" + searchKey;

                // Check if the objects are in the cache
                if(Cache[cacheKey] != null){
                    products.DataSource = (IList)Cache[cacheKey];
                }else{
                    // If that data is not in the cache then use the business logic tier to fetch the data
                    Product product = new Product();
                    IList productsBySearch = product.GetProductsBySearch(searchKey);
                    // Store the results in a cache
                    Cache.Add(cacheKey, productsBySearch, null, DateTime.Now.AddHours(12), Cache.NoSlidingExpiration , CacheItemPriority.High, null);
                    products.DataSource = productsBySearch;
                }

                // Databind the data to the controls
                products.DataBind();
            }
        }
开发者ID:GreatQiuWei,项目名称:PetShop,代码行数:28,代码来源:Search.aspx.cs

示例8: PageChanged

        protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
        {
            items.CurrentPageIndex = e.NewPageIndex;

            // Get the productId from the query string
            string productId = WebComponents.CleanString.InputText(Request["productId"], 50);

            // Array for the data
            IList itemsByProduct = null;

            // Check if the data exists in the data cache
            if(Cache[productId] != null){
                itemsByProduct = (IList)Cache[productId];
            }else{
                // If the data is not in the cache then fetch the data from the business logic tier
                Item item = new Item();
                itemsByProduct =  item.GetItemsByProduct(productId);
                // store the output in the data cache with a 12 hour expiry
                Cache.Add(productId, itemsByProduct, null, DateTime.Now.AddHours(12), Cache.NoSlidingExpiration , CacheItemPriority.High, null);
            }

            // Set the control datasource
            items.DataSource = itemsByProduct;

            // If there is data fetch the product name
            if(itemsByProduct.Count > 0)
                productName.Text = ((ItemInfo)itemsByProduct[0]).ProductName;

            // Bind the data to the the control
            items.DataBind();
        }
开发者ID:GreatQiuWei,项目名称:PetShop,代码行数:31,代码来源:Items.aspx.cs

示例9: DataGrid1_PageIndexChanged

 protected void DataGrid1_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
 {
     DataGrid1.CurrentPageIndex = e.NewPageIndex;
     DataGrid1.SelectedIndex = -1;
     DataGrid1.DataSource = (DataTable)Session["T_data"];
     DataGrid1.DataBind();
 }
开发者ID:hkiaipc,项目名称:yh,代码行数:7,代码来源:qdxx.aspx.cs

示例10: MyDataGrid_Page

 protected void MyDataGrid_Page(object sender, DataGridPageChangedEventArgs e)
 {
     //int startIndex;
     //startIndex = detail.CurrentPageIndex * detail.PageSize;
     //detail.CurrentPageIndex = e.NewPageIndex;
     //setBind();
 }
开发者ID:joleye,项目名称:1.6,代码行数:7,代码来源:templatefile_list.aspx.cs

示例11: openCasesGrid_PageIndexChanged

        private void openCasesGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            //	Set the selected page of the grid
            this.openCasesGrid.CurrentPageIndex = e.NewPageIndex;

            //	ReBind the grid to update the display
            this.DataBind();
        }
开发者ID:DovetailSoftware,项目名称:dovetail-sdk-demos,代码行数:8,代码来源:MyOpenCases.ascx.cs

示例12: dotForumDisplay_PageIndexChanged

        protected void dotForumDisplay_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            //Atualizar o index da paginação
            dotForumDisplay.CurrentPageIndex = e.NewPageIndex;

            //Carregar a GridView
            LoadThreads();
        }
开发者ID:portugol,项目名称:si,代码行数:8,代码来源:threadView.aspx.cs

示例13: PageChanged

		protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
		{
			itemsGrid.CurrentPageIndex = e.NewPageIndex;

			string id = Request.QueryString["productId"];

			itemsGrid.DataSource = new ProductManager().GetItemListByProductID(id);
			itemsGrid.DataBind();
		}
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:9,代码来源:ItemsControl.ascx.cs

示例14: DataGrid_PageChanged

 public void DataGrid_PageChanged(object sender,DataGridPageChangedEventArgs e)
 {
     this.dgList .CurrentPageIndex = e.NewPageIndex;
     UDS.Components.Task task = new UDS.Components.Task();
     DataTable mydb = Tools.ConvertDataReaderToDataTable(task.GetTodayTaskBySomeone(DateTime.Today.ToShortDateString(),Username,1));
     this.dgList .DataSource = mydb.DefaultView;
     this.dgList.DataBind();
     setgrid();
 }
开发者ID:hoku85,项目名称:UDS,代码行数:9,代码来源:Desktop.aspx.cs

示例15: PageChanged

		protected void PageChanged(object sender, DataGridPageChangedEventArgs e)
		{
			productsList.CurrentPageIndex = e.NewPageIndex;

			string id = Request.QueryString["categoryId"];

			productsList.DataSource = new ProductManager().GetProductListByCategoryID(id);
			productsList.DataBind();
		}
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:9,代码来源:ProductsControl.ascx.cs


注:本文中的System.Web.UI.WebControls.DataGridPageChangedEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。