Change js function for toggling states in gridview