Ejemplo n.º 1
0
        /// <summary>
        /// Sorts Organizations based on column selected in header.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void HandleHeaderSortClick(object sender, CommandEventArgs e)
        {
            LinkButton    btn      = sender as LinkButton;
            string        sortExpr = e.CommandArgument.ToString();
            SortDirection sortDir  = GridViewSortDirection == String.Empty || GridViewSortDirection == "ASC" ? SortDirection.Descending : SortDirection.Ascending;

            ManuscriptsGrid.Sort(sortExpr, sortDir);
        }
Ejemplo n.º 2
0
        protected void LoadManuscriptGrid(string sortExpr)
        {
            ProjectManagementDa projDA = new ProjectManagementDa();

            DataTable dt = CombineRows(projDA.GetManuscriptsByProject(projectId));

            DataView dv = new DataView(dt);

            dv.Sort = sortExpr;

            if (dt.Rows.Count == 0)
            {
                EmptyMessageLabel.Visible = true;
            }
            else
            {
                EmptyMessageLabel.Visible  = false;
                ManuscriptsGrid.DataSource = dv;
                ManuscriptsGrid.DataBind();
            }
        }