Edit in DataGrid

Edit in DataGrid

Old forum URL: forums.lhotka.net/forums/t/592.aspx


msolutions posted on Tuesday, July 11, 2006

Have been using CLSA for 2+ years and love it. However, I've just started an app where for the first time I'm using datagrids. I can bind a BusinessCollectionBase to a datagrid fine, it displays the data, I can format the columns etc.

The problem I have is the I can not edit the data. The data grid just simply won't let me edit the cells at all.

If I load an array list with several BusinessBase objects then I can edit the cells. Their not saving to the database but I've not looked into that.

Please help?

Tim

ajj3085 replied on Tuesday, July 11, 2006

First, is it a DataGrid or DataGridView?  Also, what version of Csla?

msolutions replied on Tuesday, July 11, 2006

It is System.Windows.Forms.DataGrid.

As to the CSLA version not sure. The VersionInfo.vb file says 1.5.*, the downloaded zip file is CSLA10-041124.zip. I will download the latest CSLA to see if that makes a difference.

msolutions replied on Wednesday, July 12, 2006

1.53 now installed but still not allowing editing in DataGrid.

msolutions replied on Wednesday, July 12, 2006

OK I've solved my problem. It took me most of the day to realise I needed to set Collection.AllowEdit to true.

Also look out for AllowNew.

I'm sure this is all in the book but having recently moved the bible is safely packed away somewhere.

ajj3085 replied on Wednesday, July 12, 2006

Glad you found it.  Sorry I didn't get back to you earlier, I don't check the boards after I leave work.

vargasbo replied on Wednesday, July 12, 2006

Can you elaborate on what you mean by Collection.AllowEdit? Are you talking about the data source itself, or the actually biz object?

Copyright (c) Marimer LLC