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


C# WebControls.DataGridSortCommandEventArgs类代码示例

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


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

示例1: Sort_Grid

 protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
 {
     DataView dv = new DataView(buildGridData());
     dv.Sort = e.SortExpression.ToString();
     DataGrid1.DataSource = dv;
     DataGrid1.DataBind();
 }
开发者ID:ChalmerLin,项目名称:dnt_v3.6.711,代码行数:7,代码来源:forum_forumsgrid.aspx.cs

示例2: Sort_Grid

 protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
 {
     DataView dv = new DataView(Posts.GetPostTableList());
     dv.Sort = e.SortExpression.ToString();
     DataGrid1.DataSource = dv;
     DataGrid1.DataBind();
 }
开发者ID:ZeroneBit,项目名称:dnt3_src,代码行数:7,代码来源:global_detachtable.aspx.cs

示例3: Announcements_SortCommand

        //The SortCommand event handler
        public void Announcements_SortCommand(object sender, DataGridSortCommandEventArgs e)
        {
            //Toggle SortAscending if the column that the data was sorted by has
            //been clicked again...
            if (lbOrderBy.Text == e.SortExpression)
            {
                if (lbDesc.Text == "desc")
                {
                    lbDesc.Text = "";
                    lblCurrentSort.Text = "ASC";
                    lbsort.Text = e.SortExpression;
                }
                else
                {
                    lbDesc.Text = "desc";
                    lblCurrentSort.Text = "DESC";
                    lbsort.Text = e.SortExpression;
                }
            }
            else
            {
                lbOrderBy.Text = e.SortExpression;
                lbDesc.Text = "";
                lblCurrentSort.Text = "ASC";
                lbsort.Text = e.SortExpression;
            }

            BindData();
            //rebind the DataGrid data
        }
开发者ID:ranukhandelwal,项目名称:EC,代码行数:31,代码来源:FeedManager.aspx.cs

示例4: dgarquivo_SortCommand

 protected void dgarquivo_SortCommand(object source, DataGridSortCommandEventArgs e)
 {
     DataTable dtFiles = null;
     dtFiles = CarregarLogArquivo(hid_arquivo.Value);
     SortFiles(ref dtFiles, e.SortExpression);
     dgarquivo.DataSource = dtFiles;
     dgarquivo.DataBind();
 }
开发者ID:carlaofernandesedu,项目名称:suporteinternoci,代码行数:8,代码来源:listarlogbuild.aspx.cs

示例5: articleList_SortCommand

 protected void articleList_SortCommand(object source, DataGridSortCommandEventArgs e)
 {
     FileInfo[] DataFiles = null;
     DataFiles = CarregarListaArquivos();
     SortFiles(ref DataFiles, e.SortExpression);
     articleList.DataSource = DataFiles;
     articleList.DataBind();
 }
开发者ID:carlaofernandesedu,项目名称:suporteinternoci,代码行数:8,代码来源:listarlogbuild.aspx.cs

示例6: grdMain_SortCommand

 protected void grdMain_SortCommand(object source, DataGridSortCommandEventArgs e)
 {
     if ((pc["ArticleListMain_Sort"] != null) && (pc["ArticleListMain_Sort"].ToString() == (string)e.SortExpression))
     pc["ArticleListMain_Sort"] = (string)e.SortExpression + " DESC";
       else
     pc["ArticleListMain_Sort"] = (string)e.SortExpression;
       pc["ArticleListMain_CurrentPage"] = "0";
       Response.Redirect("../Incidents/ArticleListMain.aspx");
 }
开发者ID:0anion0,项目名称:IBN,代码行数:9,代码来源:ArticleListMain.ascx.cs

示例7: grdMain_SortCommand

 protected void grdMain_SortCommand(object source, DataGridSortCommandEventArgs e)
 {
     if (ViewState["SelectIssue_Sort"].ToString() == e.SortExpression)
         ViewState["SelectIssue_Sort"] += " DESC";
     else
         ViewState["SelectIssue_Sort"] = e.SortExpression;
     ViewState["SelectIssue_CurrentPage"] = 0;
     BindGrid();
 }
开发者ID:0anion0,项目名称:IBN,代码行数:9,代码来源:SelectIncident.ascx.cs

示例8: GridActivities_SortCommand

        protected void GridActivities_SortCommand(object source, DataGridSortCommandEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            if (pc[keySort] == e.SortExpression)
                pc[keySort] += " DESC";
            else
                pc[keySort] = e.SortExpression;

            ViewState[keyPage] = 0;
            BindGrid();
        }
开发者ID:0anion0,项目名称:IBN,代码行数:15,代码来源:InActivities.ascx.cs

示例9: SortTeams_Click

        protected void SortTeams_Click(object sender, DataGridSortCommandEventArgs e)
        {
            if (ViewState["SortExpression"] != null && ViewState["SortExpression"].ToString() == e.SortExpression)
            {
                ViewState["SortAscending"] = !(bool) ViewState["SortAscending"];
            }
            else
            {
                ViewState["SortAscending"] = true;
            }

            ViewState["SortExpression"] = e.SortExpression;

            SortTeams();
        }
开发者ID:HudsonAkridge,项目名称:Terrarium-2.5,代码行数:15,代码来源:Default.aspx.cs

示例10: articleList_SortCommand

        protected void articleList_SortCommand(object source, DataGridSortCommandEventArgs e)
        {
            FileInfo[] DataFiles = null;
            if (Session["DataFiles"]==null)
            {
                DataFiles = CarregarListaArquivos(ddlambiente.Text, ddlsistema.Text);
                Session["DataFiles"] = DataFiles;
            }
            else
            {
                DataFiles = (FileInfo[]) Session["DataFiles"];
            }

            SortFiles(ref DataFiles, e.SortExpression);
            articleList.DataSource = DataFiles;
            articleList.DataBind();
        }
开发者ID:carlaofernandesedu,项目名称:suporteinternoci,代码行数:17,代码来源:listararquivos.aspx.cs

示例11: dbStaffList_SortCommand

        protected void dbStaffList_SortCommand(object source, DataGridSortCommandEventArgs e)
        {
            if (ViewState["sortfield"] == null)
            {
                ViewState["sortfield"] = e.SortExpression;
                ViewState["sortdirect"] = "ASC";
            }
            else
            {
                if (ViewState["sortfield"].ToString() == e.SortExpression)
                {
                    ViewState["sortdirect"] = (ViewState["sortdirect"].ToString() == "ASC" ? "DESC" : "ASC");
                }
                else
                {
                    ViewState["sortfield"] = e.SortExpression;
                    ViewState["sortdirect"] = "ASC";
                }
            }

            foreach (DataGridColumn col in dbStaffList.Columns)
            {
                if (col.SortExpression.ToString() == ViewState["sortfield"].ToString())
                {
                    if (ViewState["sortdirect"].ToString() == "ASC")
                    {
                        col.HeaderText += "<img src='../../images/asc.gif' border=0/>";
                        col.HeaderText = col.HeaderText.Remove(col.HeaderText.IndexOf('<'));
                        col.HeaderText += "<img src='../../images/asc.gif' border=0/>";
                    }
                    else
                    {
                        col.HeaderText += "<img src='../../images/desc.gif' border=0/>";
                        col.HeaderText = col.HeaderText.Remove(col.HeaderText.IndexOf('<'));
                        col.HeaderText += "<img src='../../images/desc.gif' border=0/>";
                    }
                }
                else
                {
                    col.HeaderText += "<img src='../../images/desc.gif' border=0/>";
                    col.HeaderText = col.HeaderText.Remove(col.HeaderText.IndexOf('<'));

                }
            }
            BindGrid();
        }
开发者ID:blfsir,项目名称:benzoa,代码行数:46,代码来源:ManageStaff.aspx.cs

示例12: SetSort

 /// <summary>
 /// ��������
 /// </summary>
 /// <param name="SB"></param>
 /// <param name="e"></param>
 public void SetSort(System.Web.UI.StateBag SB, DataGridSortCommandEventArgs e)
 {
     if (SB["sort"] == null)
     {
         SB["sort"] = e.SortExpression;
         SB["desc"] = "";
     }
     else if ((SB["sort"].ToString() + SB["desc"].ToString()).ToString() == e.SortExpression)
     {
         SB["sort"] = e.SortExpression;
         SB["desc"] = " DESC";
     }
     else
     {
         SB["sort"] = e.SortExpression;
         SB["desc"] = "";
     }
 }
开发者ID:ue96,项目名称:ue96,代码行数:23,代码来源:DataGridUtil.cs

示例13: GridItemList_SortCommand

        protected void GridItemList_SortCommand(object source, DataGridSortCommandEventArgs e)
        {
            string sortingDirection = string.Empty;
            if (sortProperty == SortDirection.Ascending)
            {
                sortProperty = SortDirection.Descending;
                sortingDirection = "Desc";
            }
            else
            {
                sortProperty = SortDirection.Ascending;
                sortingDirection = "Asc";
            }

            DataTable dataTable = Session["CatGroupList"] as DataTable;
            DataView sortedView = new DataView(dataTable);
            sortedView.Sort = e.SortExpression + " " + sortingDirection;
            GridItemList.DataSource = sortedView;
            GridItemList.DataBind();
        }
开发者ID:htphongqn,项目名称:truongcaodangngheytebinhduong,代码行数:20,代码来源:groups.aspx.cs

示例14: Sort_Grid

 protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
 {
     DataGrid1.Sort = e.SortExpression.ToString();
 }
开发者ID:wenysky,项目名称:dnt31-lite,代码行数:4,代码来源:forum_tagmanage.aspx.cs

示例15: Sort_Grid

        protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
        {
            #region 排序

            TopicTypeDataGrid.Sort = e.SortExpression.ToString();

            #endregion
        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:8,代码来源:forum_editforums.aspx.cs


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