Can't add new row with a gridview?

Can't add new row with a gridview?

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


ajj3085 posted on Saturday, July 11, 2009

Hi,

I'm trying to use a gridview to edit a collection of csla child objects. Edit and delete works fine... but the gridview doesn't seem to support a way to add a new row??

Anyone have any ideas? I have event handlers for the relevent csladatasource set. Just need something simple...

Thanks
Andy

Vinodonly replied on Monday, July 13, 2009

I'm sure that you must have checked all these points before also but pls re-check :-

1. AddNewCore added in child collection

2. Constructor of collection should have Allownew to true

3. BindingSource should allow to add new records..

ajj3085 replied on Monday, July 13, 2009

1 and 2 are true, 3 isn't because this is Asp.Net, which is why I'm using CslaDataSource. I guess I should have been more clear though.

Searching the internet though, it seems like the asp:GridView doesn't support this easily. Very annoying, because I don't have 3rd party controls at my disposal for this project :-/

Copyright (c) Marimer LLC