How disallow user to addnew in datagrid

Thanks Jarod,

I have try your suggestion but it seen cannot works.

Error Message Appear:-

" Additional information: Specified cast is not valid. "

Do you have any others idea?
 
If you're not using a DAtaview, this'll get you satarted..

Visual Basic:
                    Dim sTable As String = "myTable"
                    Dim dt As New DataTable(sTable)
                    dt = ds.Tables(sTable)
                    Dim dv As New DataView(dt)
                    Datagrid1.DataSource = dv
                    dv.AllowDelete = False
                    dv.AllowEdit = False
                    dv.AllowNew = False
 
Back
Top