I have a grid that I am trying to move the grid rows either up or down based on button click. Here is what I have so far.
Protected Sub imgBtnMoveUp_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Dim imgBtn As ImageButton Dim FirstRow As GridViewRow = gvQuoteSo.Rows(0) Dim btnUp As Button = DirectCast(FirstRow.FindControl("MoveUp"), Button) Dim gvrow As GridViewRow Dim previousRow As GridViewRow Dim index As Integer = 0 imgBtn = CType(sender, ImageButton) If imgBtn.CommandName = "MoveUp" Then index = Convert.ToInt32(imgBtn.CommandArgument) gvrow = gvQuoteSo.Rows(index) previousRow = gvQuoteSo.Rows(index - 1) UpdatePanelGrid.Update() End If End Sub
When I click the button for up nothing hapens. I know this is just the move up function but if I can get help with that then the move down will answer itself. Thanks so much!