Datagrid - how do I hide the last row?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi i'm trying to hide or disable the last row (add new record row) in the
data grid - anyone knows how
 
Nevermind, I found out the solution:

Private Sub enableLastRow(ByVal dg As DataGrid, ByVal enable As Boolean)
Dim bc As BindingManagerBase = Me.BindingContext(dg.DataSource,
dg.DataMember.ToString())
Dim cm As CurrencyManager
cm = CType(bc, CurrencyManager)
CType(cm.List, DataView).AllowNew = enable
End Sub
 
Back
Top