Tuesday, March 11, 2014

click first column content in datagridview vb.net

  If gridshot.Columns(e.ColumnIndex).Name = "Select" Then

Do not Allow Sorting in Data Grid View

 Private Sub gridshot_ColumnAdded(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewColumnEventArgs) Handles gridshot.ColumnAdded
        gridshot.Columns.Item(e.Column.Index).SortMode = DataGridViewColumnSortMode.NotSortable
    End Sub