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


C# WebControls.GridViewSortEventArgs类代码示例

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


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

示例1: gvAgency_Sorting

 protected void gvAgency_Sorting(object sender, GridViewSortEventArgs e)
 {
     LunchboxGridView4.Order(SearchResults.AsQueryable(), e.SortExpression);
     hiddenmulti.Style.Clear();
     masssubmit.Style.Clear();
     reset.Style.Clear();
 }
开发者ID:Alchemy86,项目名称:GD_BackOrders,代码行数:7,代码来源:Multibid.aspx.cs

示例2: GridViewProducts_Sorting

 protected void GridViewProducts_Sorting(object sender, GridViewSortEventArgs e)
 {
     Product.SortColumn = e.SortExpression;
     product.Sort();
     GridViewProducts.DataSource = product;
     GridViewProducts.DataBind();
 }
开发者ID:ScottWachal,项目名称:SD13GroupProject,代码行数:7,代码来源:ProductAdmin.aspx.cs

示例3: gvMOnthlySOI_Sorting

 protected void gvMOnthlySOI_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtSearch.Text))
     {
         MonthlySOIManager.SearchMonthlySOI(SqlDataSourceMonthlySOI, txtSearch.Text);
     }
 }
开发者ID:DennisPitallano,项目名称:IRMS-ACCOUNTING,代码行数:7,代码来源:MonthlySOIPanel.aspx.cs

示例4: FantasyDetailsGridView_Sorting

 protected void FantasyDetailsGridView_Sorting(object sender, GridViewSortEventArgs e)
 {
     DataTable temp = (DataTable)FantasyDetailsGridView.DataSource;
     temp.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
     FantasyDetailsGridView.DataSource = temp;
     FantasyDetailsGridView.DataBind();
 }
开发者ID:GeraldBecker,项目名称:TechProFantasySoccer,代码行数:7,代码来源:FantasyPointsDetails.aspx.cs

示例5: gvStock_Sorting

 protected void gvStock_Sorting(object sender, GridViewSortEventArgs e)
 {
     DataView sortedView = new DataView(dtView);
     sortedView.Sort = e.SortExpression + " " + "Asc";
     gvStock.DataSource = sortedView;
     gvStock.DataBind();
 }
开发者ID:CatBallJac,项目名称:COMP3111_labs-Tutos,代码行数:7,代码来源:HOME.aspx.cs

示例6: gvReport_Sorting

        protected void gvReport_Sorting(object sender, GridViewSortEventArgs e)
        {
            DonorEventList DEL = new DonorEventList(User.Identity.Name);
            EventList EL = new EventList(User.Identity.Name, int.Parse(Request["eid"].ToString()));



            string[] SortOrder = ViewState["SortExpr"].ToString().Split(' ');
            if (SortOrder[0] == e.SortExpression)
            {
                if (SortOrder[1] == "ASC")
                {
                    ViewState["SortExpr"] = e.SortExpression + " " + "DESC";
                }
                else
                {
                    ViewState["SortExpr"] = e.SortExpression + " " + "ASC";
                }
            }
            else
            {
                ViewState["SortExpr"] = e.SortExpression + " " + "ASC";
            }

            gvReport.PageIndex = 0;
            gvReport.DataSource = DEL.GetDonorEventMailedTickets_ByEvent(EL.pk_Event, ViewState["SortExpr"].ToString());
            gvReport.DataBind();
        }
开发者ID:grumpycoder,项目名称:Donor,代码行数:28,代码来源:MailedTicketeReport.aspx.cs

示例7: gridEmployees_Sorting

 protected void gridEmployees_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "FirstName" && sourceEmployeesSortedGridView.SortExpression == "LastName")
       {
     e.SortExpression = "LastName, FirstName";
       }
 }
开发者ID:bq-wang,项目名称:aspnet,代码行数:7,代码来源:GridView_Sorting_Form.aspx.cs

示例8: GridViewOrders_Sorting

        // sets sort order and re-binds page.
        
        protected void GridViewOrders_Sorting(object sender, GridViewSortEventArgs e)
        {
            SortDirection = (SortDirection == "ASC") ? "DESC" : "ASC";
            SortColumn = e.SortExpression;

            Bind();
        }
开发者ID:tuansolo,项目名称:CodeBase,代码行数:9,代码来源:Orders.aspx.cs

示例9: gwStudent_Sorting

 protected void gwStudent_Sorting(object sender, GridViewSortEventArgs e)
 {
     GridViewSortExpression = e.SortExpression;
     int pageIndex = gwStudent.PageIndex;
     gwStudent.DataSource = SortDataTable(gwStudent.DataSource as DataTable, false);
     gwStudent.DataBind();
 }
开发者ID:nehawadhwa,项目名称:ccweb,代码行数:7,代码来源:SchoolStudentList.aspx.cs

示例10: grid_Sorting

        protected void grid_Sorting(object sender, GridViewSortEventArgs e)
        {
            var arrows = new Dictionary<string, string>
                {
                    {"Name", "arrowName"},
                    {"VideoSortOrder", "arrowVideoSortOrder"}
                };
            const string urlArrowUp = "~/admin/images/arrowup.gif";
            const string urlArrowDown = "~/admin/images/arrowdown.gif";
            const string urlArrowGray = "~/admin/images/arrowdownh.gif";

            Field csf = (from Field f in _paging.Fields.Values where f.Sorting.HasValue select f).First();
            Field nsf = _paging.Fields[e.SortExpression];

            if (nsf.Name.Equals(csf.Name))
            {
                csf.Sorting = csf.Sorting == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending;
                grid_video.ChangeHeaderImageUrl(arrows[csf.Name],
                                                (csf.Sorting == SortDirection.Ascending ? urlArrowUp : urlArrowDown));
            }
            else
            {
                csf.Sorting = null;
                grid_video.ChangeHeaderImageUrl(arrows[csf.Name], urlArrowGray);

                nsf.Sorting = SortDirection.Ascending;
                grid_video.ChangeHeaderImageUrl(arrows[nsf.Name], urlArrowUp);
            }

            pageNumberer.CurrentPageIndex = 1;
            _paging.CurrentPageIndex = 1;
        }
开发者ID:AzarinSergey,项目名称:learn,代码行数:32,代码来源:ProductVideos.ascx.cs

示例11: gridView_Sorting

        protected void gridView_Sorting(object sender, GridViewSortEventArgs e)
        {
            PopulateGrid();
            List<Models.Group> listGroups = (List<Models.Group>)gvGroups.DataSource;
            switch (e.SortExpression)
            {
                case "Name":
                    listGroups = GetSortDirection(e.SortExpression) == "Asc" ? listGroups.OrderBy(g => g.Name).ToList() : listGroups.OrderByDescending(g => g.Name).ToList();
                    break;
                case "Image":
                    listGroups = GetSortDirection(e.SortExpression) == "Asc" ? listGroups.OrderBy(g => g.ImageId).ToList() : listGroups.OrderByDescending(g => g.ImageId).ToList();
                    break;
                case "Type":
                    listGroups = GetSortDirection(e.SortExpression) == "Asc" ? listGroups.OrderBy(g => g.Type).ToList() : listGroups.OrderByDescending(g => g.Type).ToList();
                    break;              
            } 

            gvGroups.DataSource = listGroups;
            gvGroups.DataBind();
            foreach (GridViewRow row in gvGroups.Rows)
            {
                var group = new Models.Group();
                var lbl = row.FindControl("lblCount") as Label;
                var dataKey = gvGroups.DataKeys[row.RowIndex];
                if (dataKey != null)
                    group = BLL.Group.GetGroup(Convert.ToInt32(dataKey.Value));              
                if (lbl != null)
                    lbl.Text = BLL.GroupMembership.GetGroupMemberCount(group.Id);
            }
        }
开发者ID:Terricide,项目名称:clonedeploy,代码行数:30,代码来源:search.aspx.cs

示例12: gvReport_Sorting

        protected void gvReport_Sorting(object sender, GridViewSortEventArgs e)
        {
            DonorList DL = new DonorList();

            string[] SortOrder = ViewState["SortExpr"].ToString().Split(' ');
            if (SortOrder[0] == e.SortExpression)
            {
                if (SortOrder[1] == "ASC")
                {
                    ViewState["SortExpr"] = e.SortExpression + " " + "DESC";
                }
                else
                {
                    ViewState["SortExpr"] = e.SortExpression + " " + "ASC";
                }
            }
            else
            {
                ViewState["SortExpr"] = e.SortExpression + " " + "ASC";
            }

            gvReport.PageIndex = 0;

            gvReport.DataSource = DL.GetDonorDemoUpdates(ViewState["SortExpr"].ToString());
            gvReport.DataBind();

        }
开发者ID:grumpycoder,项目名称:Donor,代码行数:27,代码来源:DonorDemographicChangeReport.aspx.cs

示例13: OnSorting

        protected override void OnSorting(GridViewSortEventArgs e)
        {
            foreach (DataControlField column in Columns)
            {
                if (column.SortExpression == e.SortExpression)
                {
                    column.HeaderStyle.CssClass = "sorted";
                    column.HeaderStyle.BackColor = Color.Khaki;

                    if (e.SortDirection == SortDirection.Descending)
                        column.HeaderText = ViewState[column.SortExpression] + " [asc]";
                    else
                        column.HeaderText = ViewState[column.SortExpression] + " [desc]";
                }
                else
                {
                    if (ViewState[column.SortExpression] != null)
                        column.HeaderText = ViewState[column.SortExpression] as string;
                    column.HeaderStyle.CssClass = "";
                    column.HeaderStyle.BackColor = Color.White;
                }
            }

            base.OnSorting(e);
        }
开发者ID:spbooks,项目名称:ASPNETANT1,代码行数:25,代码来源:SortableGridView.aspx.cs

示例14: agvCustomers_Sorting

        protected void agvCustomers_Sorting(object sender, GridViewSortEventArgs e)
        {
            var arrows = new Dictionary<string, string>
                {
                    {"Lastname", "arrowLastname"},
                    {"Firstname", "arrowFirstname"},
                    {"Email", "arrowEmail"},
                };

            string urlArrowUp = UrlService.GetAdminAbsoluteLink("images/arrowup.gif");
            string urlArrowDown = UrlService.GetAdminAbsoluteLink("images/arrowdown.gif");
            string urlArrowGray = UrlService.GetAdminAbsoluteLink("images/arrowdownh.gif");

            Field csf = (from Field f in _paging.Fields.Values where f.Sorting.HasValue select f).First();
            Field nsf = _paging.Fields[e.SortExpression];

            if (nsf.Name.Equals(csf.Name))
            {
                csf.Sorting = csf.Sorting == SortDirection.Ascending ? SortDirection.Descending : SortDirection.Ascending;
                agvCustomers.ChangeHeaderImageUrl(arrows[csf.Name],
                                                  (csf.Sorting == SortDirection.Ascending ? urlArrowUp : urlArrowDown));
            }
            else
            {
                csf.Sorting = null;
                agvCustomers.ChangeHeaderImageUrl(arrows[csf.Name], urlArrowGray);
                nsf.Sorting = SortDirection.Ascending;
                agvCustomers.ChangeHeaderImageUrl(arrows[nsf.Name], urlArrowUp);
            }

            pageNumberer.CurrentPageIndex = 1;
            _paging.CurrentPageIndex = 1;
        }
开发者ID:AzarinSergey,项目名称:learn,代码行数:33,代码来源:PopupGridCustomers.ascx.cs

示例15: StudentGrid_Sorting

 protected void StudentGrid_Sorting(object sender, GridViewSortEventArgs e)
 {
     DataView view = new DataView(BindData());
     view.Sort = e.SortExpression + " " + "Asc";
     StudentGrid.DataSource = view;
     StudentGrid.DataBind();
 }
开发者ID:jaskarans-optimus,项目名称:Induction,代码行数:7,代码来源:AllStudents.aspx.cs


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