Ejemplo n.º 1
0
    protected void grdContainers_Sorting(object sender, GridViewSortEventArgs e)
    {
        try
        {
            if (sortingColumn != null && sortingColumn.Equals(e.SortExpression))    // if the list is already sorted by this column,
            {                                                                       // toggle ascending/descending
                sortAscending = !sortAscending;
            }
            else                                                                    // else, set new column and set sorting to ascending
            {
                sortingColumn = e.SortExpression;
                sortAscending = true; // set false because default is ascending
            }

            ViewState["sortingColumn"] = sortingColumn;
            ViewState["sortAscending"] = sortAscending;

            updateGridView();
        }
        catch (System.Threading.ThreadAbortException) { }
        catch (Exception ex)
        {
            LogError.logError(ex);
            Response.Redirect("../errorpages/error.aspx");
        }
    }
Ejemplo n.º 2
0
 protected void gvCatalogo_Sorting(object sender, GridViewSortEventArgs e)
 {
     string sortExpression = "";
     if (ViewState["sortexpression"] != null)
     {
         sortExpression = ViewState["sortexpression"].ToString();
     }
     ViewState["sortexpression"] = e.SortExpression;
     if (sortExpression != ViewState["sortexpression"].ToString())
     {
         ViewState["sortdirection"] = "asc";
     }
     else
     {
         if (ViewState["sortdirection"] == null)
         {
             ViewState["sortdirection"] = "asc";
         }
         else
         {
             if (ViewState["sortdirection"].ToString() == "asc")
             {
                 ViewState["sortdirection"] = "desc";
             }
             else
             {
                 ViewState["sortdirection"] = "asc";
             }
         }
     }
     gvCatalogo.PageIndex = 0;
     CargarGrid();
 }
Ejemplo n.º 3
0
 protected void gvNominees_Sorting(object sender, GridViewSortEventArgs e)
 {
     SortDirection =
             (SortDirection == SortDirection.Ascending) ? SortDirection.Descending : SortDirection.Ascending;
     SortColumn = e.SortExpression;
     LoadNominees();
 }
 protected void grdCustomerFollowupAction_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "Insert")
     {
         Server.Transfer("CustomerFollowupAction.aspx");
     }
 }
Ejemplo n.º 5
0
 public void GridViewSort(object sender, GridViewSortEventArgs e)
 {
     string sortExpression = e.SortExpression;
     if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null))
     {
         if (this.ViewState["SortOrder"].ToString() == sortExpression)
         {
             if (this.ViewState["OrderDire"].ToString() == "Desc")
             {
                 this.ViewState["OrderDire"] = "ASC";
             }
             else
             {
                 this.ViewState["OrderDire"] = "Desc";
             }
         }
         else
         {
             this.ViewState["SortOrder"] = e.SortExpression;
             this.ViewState["OrderDire"] = "ASC";
         }
     }
     else
     {
         this.ViewState["SortOrder"] = e.SortExpression;
         this.ViewState["OrderDire"] = "ASC";
     }
 }
 protected void grdPaymentMethod_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "Insert")
     {
         Server.Transfer("PaymentMethod.aspx");
     }
 }
Ejemplo n.º 7
0
 protected void grdCustomers_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "Insert")
     {
         Response.Redirect("Customer.aspx");
     }
 }
 protected void grdRepresentants_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "Insert")
     {
         Server.Transfer("Representant.aspx");
     }
 }
Ejemplo n.º 9
0
 protected void departmentsGrid_Sorting(object sender, GridViewSortEventArgs e)
 {
     // Retrieve the name of the clicked column (sort expression)
     string sortExpression = e.SortExpression;
     // Decide and save the new sort direction
     if (sortExpression == gridSortExpression)
     {
         if(gridSortDirection == SortDirection.Ascending)
         {
             gridSortDirection = SortDirection.Descending;
         }
         else
         {
             gridSortDirection = SortDirection.Ascending;
         }
     }
     else
     {
         gridSortDirection = SortDirection.Ascending;
     }
     // Save the new sort expression
     gridSortExpression = sortExpression;
     // Rebind the grid to its data source
     BindGrid();
 }
 protected void grdScheduleTasks_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (e.SortExpression == "Insert")
     {
         Server.Transfer("ScheduleTask.aspx");
     }
 }
Ejemplo n.º 11
0
 protected void gv_Sorting(object sender, GridViewSortEventArgs e)
 {
     GridView gv = (GridView)sender;
     IEnumerable<ticket> sortedGroup;
     if (gv.ID.Equals("gvMy")) sortedGroup = myTickets;
     else sortedGroup = groupTickets;
     if (Session[e.SortExpression] == null || Session[e.SortExpression].ToString().Equals("+"))
     {
         Session[e.SortExpression] = "-";
         switch (e.SortExpression)
         {
             case "priority": sortedGroup = sortedGroup.OrderBy(p => p.priority1.level); break;
             case "title": sortedGroup = sortedGroup.OrderBy(p => p.title); break;
             case "submitted": sortedGroup = sortedGroup.OrderBy(p => p.submitted); break;
             case "status": sortedGroup = sortedGroup.OrderBy(p => p.statuse.status_order); break;
             default: break;
         }
     }
     else
     {
         Session[e.SortExpression] = "+";
         switch (e.SortExpression)
         {
             case "priority": sortedGroup = sortedGroup.OrderByDescending(p => p.priority1.level); break;
             case "title": sortedGroup = sortedGroup.OrderByDescending(p => p.title); break;
             case "submitted": sortedGroup = sortedGroup.OrderByDescending(p => p.submitted); break;
             case "status": sortedGroup = sortedGroup.OrderByDescending(p => p.statuse.status_order); break;
             default: break;
         }
     }
     
     gv.DataSource = sortedGroup;
     gv.DataBind();
 }
Ejemplo n.º 12
0
 protected void GridViewQuotation_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (!string.IsNullOrEmpty(txtCountry.Text))
     {
       SqlDataSourceQuot.SelectCommand = "SELECT vw_Quotation.Quotation_Version_Id, vw_Quotation.Quotation_No, vw_Quotation.Vername,vw_Quotation.Quotation_Status_Name, vw_Quotation.code, vw_Quotation.companyname, vw_Quotation.Product_Name, vw_Quotation.Model_No, vw_Quotation.username, vw_Quotation.Quotation_OpenDate, vw_Quotation.Client_Id, vw_Quotation.fname, vw_Quotation.SalesId , quotation_country FROM vw_Quotation LEFT OUTER JOIN m_employee_accesslevel ON vw_Quotation.Access_Level_ID = m_employee_accesslevel.accesslevel_id WHERE ((m_employee_accesslevel.employee_id = @employee_id) OR (vw_Quotation.Access_Level_ID IS NULL)) AND Client_Id like @Client_Id AND SalesId like @SalesId AND ([Product_Name] LIKE '%' + @Product_Name + '%') AND ([Model_No] LIKE '%' + @Model_No + '%') AND vw_Quotation.Quotation_Version_Id in (Select quotation_id from Quotation_Target,Country Where Quotation_Target.country_id = dbo.country.country_id and country_name like '%' + @quotation_country + '%') ORDER BY vw_Quotation.Quotation_No DESC, vw_Quotation.Vername, vw_Quotation.Model_No ";
     }
 }
Ejemplo n.º 13
0
    protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
    {
        DataTable dataTable = GridView1.DataSource as DataTable;
        string sortExpression = e.SortExpression;
        string direction = string.Empty;

        if (dataTable != null)
        {
            DataView dataView = new DataView(dataTable);

            if (SortDirection == SortDirection.Descending)
            {
                SortDirection = SortDirection.Ascending;
                direction = " ASC";
            }
            else
            {
                SortDirection = SortDirection.Descending;
                direction = " DESC";
            }

            DataTable table = GridView1.DataSource as DataTable;
            table.DefaultView.Sort = sortExpression + direction;

            GridView1.DataSource = table;
            GridView1.DataBind();

        }
    }
Ejemplo n.º 14
0
    protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
    {
        //var teste = from Tabela in Contexto.TB_DESENVOLVEDOR
        //            orderby Tabela.ID_DESENVOLVEDOR descending
        //            select Tabela;

        switch (e.SortExpression)
        {
            case "ID_DESENVOLVEDOR":
                {
                    if (((SortDirection)ViewState["TIPO_ORDENACAO"]) == SortDirection.Ascending)
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Descending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderBy(x => x.ID_DESENVOLVEDOR);
                    }
                    else
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Ascending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderByDescending(x => x.ID_DESENVOLVEDOR);
                    }

                    break;
                }

            case "NM_DESENVOLVEDOR":
                {
                    if (((SortDirection)ViewState["TIPO_ORDENACAO"]) == SortDirection.Ascending)
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Descending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderBy(x => x.NM_DESENVOLVEDOR);
                    }
                    else
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Ascending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderByDescending(x => x.NM_DESENVOLVEDOR);
                    }

                    break;
                }

            case "NR_IDADE":
                {
                    if (((SortDirection)ViewState["TIPO_ORDENACAO"]) == SortDirection.Ascending)
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Descending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderBy(x => x.NR_IDADE);
                    }
                    else
                    {
                        ViewState["TIPO_ORDENACAO"] = SortDirection.Ascending;
                        GridView1.DataSource = Contexto.TB_DESENVOLVEDOR.OrderByDescending(x => x.NR_IDADE);
                    }

                    break;
                }
        }

        GridView1.DataBind();
    }
Ejemplo n.º 15
0
 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
 {
     DataSet ds = getData();
     DataView dataView = new DataView(ds.Tables[0]);
     dataView.Sort = e.SortExpression;
     GridView1.DataSource = dataView;
     GridView1.DataBind();
 }
Ejemplo n.º 16
0
 protected void gvReparaciones_Sorting(object sender, GridViewSortEventArgs e)
 {
     //if (e.SortExpression == "vehiculo.dominio") { ViewState["OrdenGvReparaciones"] = "dominio"; }
     //else if (e.SortExpression == "vehiculo.cliente.nombreCompleto") { ViewState["OrdenGvReparaciones"] = "apellido"; }
     //else if (e.SortExpression == "estadoReparacion.nombreEstado") { ViewState["OrdenGvReparaciones"] = "nombreEstado"; }
     //else if (e.SortExpression == "total") { ViewState["OrdenGvReparaciones"] = "totalMO"; }
     ViewState["OrdenGvReparaciones"] = e.SortExpression;
     cargarGrilla();
 }
Ejemplo n.º 17
0
 protected void gvFacturas_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (ViewState["dt"] != null)
     {
         DataTable dt = (DataTable)ViewState["dt"];
         dt.DefaultView.Sort = e.SortExpression + " " + cambiarSortDirection();
         gvFacturas.DataSource = dt;
         gvFacturas.DataBind();
     }
 }
    protected void sorting(object sender, GridViewSortEventArgs e)
    {
        ISession session = DatabaseEntities.NHibernateHelper.CreateSessionFactory().OpenSession();
        ICriteria criteria = session.CreateCriteria(typeof(DatabaseEntities.User))
                                        .Add(Restrictions.Eq("CurrentCommittee", committee.ID))
                                        .AddOrder(new Order(e.SortExpression.ToString(), true));

        GridViewUsers.DataSource = criteria.List<DatabaseEntities.User>();
        GridViewUsers.DataBind();
    }
Ejemplo n.º 19
0
    /// <summary>
    /// This event is used to sort the contents of the grid
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public static void GridSort(HtmlInputHidden txthdnSortOrder, GridViewSortEventArgs e, GridView grdReport, int formName, object objCollection)
    {
        string strSortDir = null;

        try
        {
            //storing the value in hidden variable
            if (txthdnSortOrder.Value.Length == 0)
            {
                txthdnSortOrder.Value = e.SortDirection.ToString();
            }

            //To reverse the sort order
            if (txthdnSortOrder.Value.Length != 0)
            {
                if (txthdnSortOrder.Value == "Ascending")
                {
                    txthdnSortOrder.Value = "Descending";
                }
                else
                {
                    txthdnSortOrder.Value = "Ascending";
                }
            }

            //checking the condition and sorting accordingly
            switch (txthdnSortOrder.Value)
            {
                case "Ascending":
                    strSortDir = "ASC";
                    break;

                case "Descending":
                    strSortDir = "DESC";
                    break;
            }

            //Appending arrow symbol to the grid header according to the sorting.
            GridSorting.AppendSortOrderImageToGridHeader(txthdnSortOrder.Value, e.SortExpression, ref grdReport);
            GridSortingEx(formName, strSortDir, e.SortExpression, ref grdReport, objCollection);

            //Add data to the GridView
            //GridSorting.MakeAccessible(grdReport);
        }
        catch (Exception ex)
        {
            //bool rethrow = ExceptionPolicy.HandleException(ex, ARSConstants.StrPerDatumUIPolicy);

            //if (rethrow)
            //    throw;

            ////Redirecting to error message page
            //HttpContext.Current.Server.Transfer(ARSConstants.StrErrorPageURL);
        }
    }
Ejemplo n.º 20
0
    protected void adminGrid_Sorting(object sender, GridViewSortEventArgs e)
    {
        SortDirection sortDirection = SortDirection.Ascending;
        string sortField = string.Empty;

        SortGridview((GridView)sender, e, out sortDirection, out sortField);
        string strSortDirection = sortDirection == SortDirection.Ascending ? "ASC" : "DESC";

        adminGrid.DataSource = UserDataAccessLayer.GetAllUsers(e.SortExpression + " " + strSortDirection);
        adminGrid.DataBind();
    }
 protected void grvContact_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (ViewState["SortDirection"] == null)
         ViewState["SortDirection"] = "ASC";
     else
     {
         ViewState["SortDirection"] = ViewState["SortDirection"].ToString() == "ASC" ? "DESC" : "ASC";
     }
     List<UContactEntity> listContact = UContactBRL.GetAll();
     grvContact.DataSource = UContactEntity.Sort(listContact, e.SortExpression, ViewState["SortDirection"].ToString());
     grvContact.DataBind();
 }
 protected void grvFAQCategory_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (ViewState["SortDirection"] == null)
             ViewState["SortDirection"] = "ASC";
         else
         {
             ViewState["SortDirection"] = ViewState["SortDirection"].ToString() == "ASC" ? "DESC" : "ASC";
         }
         List<CateFaqEntity> list = CateFaqBRL.GetAll();
         grvFAQCategory.DataSource = CateFaqEntity.Sort(list, e.SortExpression, ViewState["SortDirection"].ToString());
         grvFAQCategory.DataBind();
 }
Ejemplo n.º 23
0
 protected void grvPosition_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (ViewState["SortDirection"] == null)
         ViewState["SortDirection"] = "ASC";
     else
     {
         ViewState["SortDirection"] = ViewState["SortDirection"].ToString() == "ASC" ? "DESC" : "ASC";
     }
     List<GroupEntity> list = GroupBRL.GetAll();
     grvGroup.DataSource = GroupEntity.Sort(list, e.SortExpression, ViewState["SortDirection"].ToString());
     grvGroup.DataBind();
 }
 protected void grvTinh_Sorting(object sender, GridViewSortEventArgs e)
 {
     if (ViewState["SortDirection"] == null)
         ViewState["SortDirection"] = "ASC";
     else
     {
         ViewState["SortDirection"] = ViewState["SortDirection"].ToString() == "ASC" ? "DESC" : "ASC";
     }
     List<TinhEntity> listTinh = TinhBRL.GetAll();
     grvTinh.DataSource = TinhEntity.Sort(listTinh, e.SortExpression, ViewState["SortDirection"].ToString());
     grvTinh.DataBind();
 }
Ejemplo n.º 25
0
 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
 {
     string sortExpression = e.SortExpression.ToString();
     string sortDirection = "ASC";
     if (sortExpression == GridView1.Attributes["SortExpression"])
     {
         sortDirection = (GridView1.Attributes["SortDirection"].ToString() == sortDirection ? "DESC" : "ASC");
     }
     GridView1.Attributes["SortExpression"] = sortExpression;
     GridView1.Attributes["SortDirection"] = sortDirection;
     BindGrid();
 }
Ejemplo n.º 26
0
    protected void gridBCCAudit_OnSort(object sender, GridViewSortEventArgs e)
    {
        DataTable dataTable = BCCAuditDataAccess.RetrieveAuditRecords(startRow, endRow);

        if (dataTable != null)
        {
            DataView dataView = new DataView(dataTable);
            dataView.Sort = e.SortExpression + " " + ToggleDirection();
            gridBCCAudit.DataSource = dataView;
            gridBCCAudit.DataBind();
        }
    }
Ejemplo n.º 27
0
    protected void gvThisWeekItems_Sorting(object sender, GridViewSortEventArgs e)
    {
        DataSet ds = gvThisWeekItems.DataSource as DataSet;
        DataTable dtSortTable = ds.Tables[0];
        if (dtSortTable != null)
        {
            DataView dvSortedView = new DataView(dtSortTable);
            dvSortedView.Sort = e.SortExpression + " " + getSortDirectionString(e.SortDirection);

            gvThisWeekItems.DataSource = dvSortedView;
            gvThisWeekItems.DataBind();
        }
    }
    protected void GridSorting(object sender, GridViewSortEventArgs e)
    {
        _sortDir = e.SortDirection;
        _sortExpr = e.SortExpression;
        grdSecuredActionLocations.CurrentSortExpression = _sortExpr;
        grdSecuredActionLocations.CurrentSortDirection = _sortDir.ToString();

        List<SecuredActionLocation> usage = GetData();

        usage.Sort(DoSort);

        grdSecuredActionLocations.DataBind();
    }
    protected void grdEquipments_Sorting(object sender, GridViewSortEventArgs e)
    {
        if (e.SortExpression == "Insert")
        {
            frmEquipment.DataBind();
            frmEquipment.PageIndex = -1;
            frmEquipment.ChangeMode(FormViewMode.Insert);

            grdEquipments.Visible = false;
            frmEquipment.Visible = true;
            e.Cancel = true;
        }
    }
    protected void gvAPopulation_Sorting(object sender, GridViewSortEventArgs e)
    {
        DataTable dataTable = gvAPopulation.DataSource as DataTable;

        if (dataTable != null)
        {
            DataView dataView = new DataView(dataTable);
            dataView.Sort = e.SortExpression + " " + ConvertSortDirectionToSql(e.SortDirection);

            gvAPopulation.DataSource = dataView;
            gvAPopulation.DataBind();
        }
    }
Ejemplo n.º 31
0
 protected void AddressGrid_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
 protected void grid_Sorting(object sender, GridViewSortEventArgs e)
 {
     grid.DataBind();
 }
Ejemplo n.º 33
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void gvCobroRecurrenteLiquidacion_Sorting(object sender, GridViewSortEventArgs e)
 {
     //Cambiando Expresion de Ordenamiento
     lblOrdenadoCRL.Text = TSDK.ASP.Controles.CambiaSortExpressionGridView(gvCobroRecurrenteLiquidacion, TSDK.Datos.OrigenDatos.RecuperaDataTableDataSet((DataSet)Session["DS"], "Table"), e.SortExpression);
 }
 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
 {
     hdnsortExp.Value = e.SortExpression.ToString();
     hdnsortDir.Value = sortOrder;
     Fillgrid();
 }
Ejemplo n.º 35
0
 protected void OnSorting(object sender, GridViewSortEventArgs e)
 {
     this.BindGrid(e.SortExpression);
 }
 protected void gvComm_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
 protected void gv_Sorting(object sender, GridViewSortEventArgs e)
 {
     //dlist.DefaultView.Sort = e.SortExpression + " " + SortDir(e.SortExpression);
     //gvMotorInsurance.DataSource = dlist;
     //gvMotorInsurance.DataBind();
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
        {
            e.Sorting(sender);

            this.DataBind(false, true);
        }
Ejemplo n.º 39
0
 /// <summary>
 /// Click en criterio de ordenamiento de GV
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void gvKilometrajesPendientes_Sorting(object sender, GridViewSortEventArgs e)
 {
     //Cambiando Expresion de Ordenamiento
     lblOrdenadoPendiente.Text = TSDK.ASP.Controles.CambiaSortExpressionGridView(gvKilometrajesPendientes, TSDK.Datos.OrigenDatos.RecuperaDataTableDataSet((DataSet)Session["DS"], "Table1"), e.SortExpression, true, 0);
 }
 protected void gvAverageOutturnOverTimeList_Sorting(object sender, GridViewSortEventArgs e)
 {
     this.GridViewSortExpression = e.SortExpression;
     base.SetSortDirection();
     LoadFilteredList();
 }
Ejemplo n.º 41
0
 protected void usrGV_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
Ejemplo n.º 42
0
 protected void ordenacaoGrid(object s, GridViewSortEventArgs e)
 {
     dtDados.DefaultView.Sort = e.SortExpression + " " + GetSortDirection(e.SortExpression);
     popularGrid((GridView)s);
 }
Ejemplo n.º 43
0
 /// <summary>
 /// Handles the Sorting event of the grdContactMarketing control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewSortEventArgs"/> instance containing the event data.</param>
 protected void ContactMarketing_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
Ejemplo n.º 44
0
 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
 {
     WriteMessage();
 }
Ejemplo n.º 45
0
 protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
 {
     GridView1.DataBind();
     btnexceldownload.Visible = true;
 }
Ejemplo n.º 46
0
 protected void grd_ParticipantsList_Sorting(object sender, GridViewSortEventArgs e)
 {
     string s  = e.SortExpression.ToString();
     string s2 = e.SortDirection.ToString();
 }
 protected void gvReturns_Sorting(object sender, GridViewSortEventArgs e)
 {
     GridViewSortExpresion = e.SortExpression;
     pageAndSort(gvReturns, GridViewSortExpresion, getSource(), gvReturns.PageIndex);
 }
Ejemplo n.º 48
0
 protected void GridView2_Sorting(object sender, GridViewSortEventArgs e)
 {
     GridView2.DataBind();
 }
 protected void dgvSubCategory_Sorting(object sender, GridViewSortEventArgs e)
 {
     hdnSelectedIDs.Value    = "";
     ViewState["SortColumn"] = e.SortExpression;
     LoadSubCategoryData(false, true);
 }
Ejemplo n.º 50
0
 protected void gvManualAttnd_sorting(object sender, GridViewSortEventArgs e)
 {
     bindDataGrid();
 }
Ejemplo n.º 51
0
 protected void gvCart_Sorting(object sender, GridViewSortEventArgs e)
 {
     SetState(gvCart.ID + "sortexpression", e.SortExpression);
     LoadProducts();
 }
Ejemplo n.º 52
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void gvReporteFacturas_Sorting(object sender, GridViewSortEventArgs e)
 {   //Cambiando Expresión de Ordenamiento
     lblCriterio.Text = TSDK.ASP.Controles.CambiaSortExpressionGridView(gvReporteFacturas, ((DataSet)Session["DS"]).Tables["Table"], e.SortExpression);
 }
Ejemplo n.º 53
0
 protected void grvSearch_Sorting(object sender, GridViewSortEventArgs e)
 {
     BindGridView(e.SortExpression, sortOrder);
 }
        protected void gvUsers_Sorting(object sender, GridViewSortEventArgs e)
        {
            // prop is null at this point, so the next line fails
            if (ListUsers.Count > 0)
            {
                string        orderby   = gvUsers.OrderBy;
                SortDirection direction = SortDirection.Ascending;
                if (orderby.ToLower().EndsWith("desc"))
                {
                    direction = SortDirection.Descending;
                    orderby   = orderby.Split(' ')[0];
                }

                List <Twitter.User> sortedList = null;
                if (orderby == Constants.GetVariableName(() => ListUsers[0].Index))
                {
                    if (direction == SortDirection.Ascending)
                    {
                        sortedList = ListUsers.OrderBy(x => x.Index).ToList();
                    }
                    else
                    {
                        sortedList = ListUsers.OrderByDescending(x => x.Index).ToList();
                    }
                }
                else if (orderby == Constants.GetVariableName(() => ListUsers[0].ScreenName))
                {
                    if (direction == SortDirection.Ascending)
                    {
                        sortedList = ListUsers.OrderBy(x => x.ScreenName).ToList();
                    }
                    else
                    {
                        sortedList = ListUsers.OrderByDescending(x => x.ScreenName).ToList();
                    }
                }
                else if (orderby == Constants.GetVariableName(() => ListUsers[0].ProfileImage))
                {
                    if (direction == SortDirection.Ascending)
                    {
                        sortedList = ListUsers.OrderBy(x => x.ProfileImage).ToList();
                    }
                    else
                    {
                        sortedList = ListUsers.OrderByDescending(x => x.ProfileImage).ToList();
                    }
                }
                else if (orderby == Constants.GetVariableName(() => ListUsers[0].UserId))
                {
                    if (direction == SortDirection.Ascending)
                    {
                        sortedList = ListUsers.OrderBy(x => x.UserId).ToList();
                    }
                    else
                    {
                        sortedList = ListUsers.OrderByDescending(x => x.UserId).ToList();
                    }
                }
                ListUsers = new BindingList <Twitter.User>(sortedList);
                BindData();
            }
        }
Ejemplo n.º 55
0
 protected void gwdetails_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
Ejemplo n.º 56
0
 /// <summary>
 /// Sortings the specified sender.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewSortEventArgs"/> instance containing the event data.</param>
 protected void Sorting(Object sender, GridViewSortEventArgs e)
 {
 }
 public void GridView_Sorting(Object sender, GridViewSortEventArgs e)
 {
     DatabaseQuery();
     UtilityGridView.GridView_Sorting(sender, e);
 }
Ejemplo n.º 58
0
 protected void GVInfo_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
Ejemplo n.º 59
0
 protected void gv_Report_Sorting(object sender, GridViewSortEventArgs e)
 {
 }
Ejemplo n.º 60
0
 protected void GridView1_Sorting1(object sender, GridViewSortEventArgs e)
 {
     coluna = e.SortExpression;
     GridView1.DataSource = bindGrid();
     GridView1.DataBind();
 }