Hi sanagasetti,
I cannot download your project so I'm not sure what you've done so far.
I would write a method that handles a DropDownList's
SelectedIndexChanged Event. In the template for the column, specify the method for the DropDownList to call during its SelectedIndexChanged event.
In that Method, I would retrieve the DropDownList (casting the sender into a DropDOwnList) so that I could retrieve the row that the DropDownList is representing. You can retrieve the GridViewRow using the DropDownList's
NamingContainer.
Once you have the row, you will have to do the necessary work to rearrange the other rows based on what the new selected value is. I think the easiest way to do this would be to rearrange the DataSource that you are using for the GridView based on the newly selected value and the old one...
After you have rearranged the items in the DataSource, you will have to rebind the GridView to it.
- private void dropDownList_SelectionChanged(object sender, SelectionChangedEventArgs e)
-
{
-
-
DropDownList ddl = (DropDownList)sender;
-
GridViewRow container = (GridViewRow)ddl.NamingContainer;
-
-
// now that you have the row and the drop down list you can
-
// determine what the value was, and what it was changed to
-
// you have to rearrange the items in the data source that
-
// you are using for your gridview and re bind the gridview
-
// to the datasource
-
-
}
-Frinny