gridview sort triggering drop down select index changed??????
Posted on 2006-05-10
hi all, i've got a web app that has a drop down box with values day/week/month/year which populates a datagrid with the appropriate sales values. the drop down has autopostback = true, so when changing from time frame values, the grid is repopulated.
the columns in the datagrid are sortable, so if column a is clicked, sort is ascending, if column a is clicked again, sort is descending.
i noticed the sorting was taking more time than usual, while watching debug path of execution, turns out when you click a column to sort, the dropdown index changed event is fired, then the sorting routine is called. why??????
how can i prevent .net from triggering the drop down index changed value from firing when user is just sorting??? and more specifically, why is asp.net doing this in the first place?? the code is not specifically launching the change event.
thanks in advanced