update gridview and change actoin to function