Mata

Mata

  • NA
  • 46
  • 34.2k

SOLVED Deafult last column sorting gridview problem

Nov 22 2011 4:01 AM
my last column is editible (combination of dropdown list (edit item template) and label (item template). Everything works fine, but everytime when I update one of rows for that column, column gets sorted (I mean rows get sorts by that column), why is that how can i disable this column sorting, It's strange cause i don't have sorting expression defined for that (editable) column. It's anoying how row, when it is updated runs to the top of table, it isn't still because of this default column sorting.


.......solved it. I added this line in Init Event, it puts first column as default for sorting on page loadprotected void Gridview_Init(object sender, EventArgs e)
{
Gridview1.Sort("FirstColumn",SortDirection.Descending);
}