Datagrid question

  • Thread starter Thread starter Q
  • Start date Start date
Q

Q

Hello to you all,

Sorry for cross posting this question, but the other group is not that often
visited as this one.

Here's my question:

I have an application with a datagrid.

The user should only be able to update records in this datagrid.
Additions should be impossible.
I just can not find the correct property for achieving this goal.

Maybe there is another way of achieving this, with another control for
example?

Can anyone help out?

Thanks,

Q
 
If your grid is a Windows Forms DataGrid and if its DataSource is a
DataTable, then after setting the DataSource property, try code like:

Dim cm As CurrencyManager =
CType(dataGrid1.BindingContext(dataGrid1.DataSource,
dataGrid1.DataMember), CurrencyManager)
Dim dv As DataView = CType(cm.List, DataView)
dv.AllowNew = False

=====================
Clay Burch
Syncfusion, Inc.
 
Q

A little bit shorter than Clays his answer

\\\
myDataTable.Defaultview.addnew = false
myDataGrid.DataSource = myDataTable.Defaultview
///

Moreover I write this for your term crossposting. Probably you have multiposted this message, which most of us don't like. Crossposting is sending a message in one time to all newsgroups, then we can all see if there is already result.


Cor
"Q" <[email protected]> schreef in bericht Hello to you all,

Sorry for cross posting this question, but the other group is not that often visited as this one.

Here's my question:

I have an application with a datagrid.

The user should only be able to update records in this datagrid.
Additions should be impossible.
I just can not find the correct property for achieving this goal.

Maybe there is another way of achieving this, with another control for example?

Can anyone help out?

Thanks,

Q
 
Back
Top