Geeks With Blogs


Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done
When user clicks GridViewRow Edit, depending on the data in the GridViewRow, enable/disable column(s)
Protected Sub GridView1_RowDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim Offline_MediaId As Integer = Integer.Parse(e.Row.Cells(1).Text)
            If Offline_MediaId > 4 Then
                'Dim textBox As TextBox = CType(e.Row.FindControl("txteStart_DATE"), TextBox)
                'textBox.Enabled = False
                e.Row.Cells(3).Enabled = False
                e.Row.Cells(4).Enabled = False
                e.Row.Cells(5).Enabled = False
            End If
        End If
    End Sub


Posted on Tuesday, March 4, 2008 7:28 AM GridView, Datagrid, DataList & Repeater | Back to top

Comments on this post: GridViewRow Edit, disable column(s)

# re: GridViewRow Edit, disable column(s)
Requesting Gravatar...
Really great post, thanks so much for sharing this.
Left by canvas prints on Dec 08, 2011 5:35 AM

Your comment:
 (will show your gravatar)

Copyright © Rodney Vinyard | Powered by: