Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void grdProtocolli_Sorting(object sender, GridViewSortEventArgs e)
- {
- if (ViewState["SortExpression"] == null) //Se non c'è nessun ordinamento non c'è nulla
- {
- ViewState["SortExpression"] = e.SortExpression; //Inserisco l'ordinamento
- ViewState["sortDirect"] = "TRUE"; //e la direzione è ASC
- }
- else
- {
- if (Convert.ToString(ViewState["SortExpression"]) == e.SortExpression &&
- Convert.ToString(ViewState["sortDirect"]) == "TRUE") //Se ha ripremuto
- {
- ViewState["sortDirect"] = "FALSE"; //e la direzione è ASC
- }
- else if (Convert.ToString(ViewState["SortExpression"]) == e.SortExpression &&
- Convert.ToString(ViewState["sortDirect"]) == "FALSE")
- {
- ViewState["sortDirect"] = "TRUE"; //e la direzione è ASC
- }
- else
- {
- ViewState["SortExpression"] = e.SortExpression; //Nuovo ordinamento
- ViewState["sortDirect"] = "TRUE"; //direzione è ASC
- }
- }
- //Ribindo la griglia
- bindaGriglia(ViewState["Next"] as string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement