Can't add a new record in a DataGridView in Master Details formHelp! Totally stuck with this problem...<br/><br/>I have a form bound to an entity (ClientAssessment). Each client assessment record may have multiple mental health disorders associated with it. I eager load these as part of the form's query using an Include statement and display them in a DataGridView as the &quot;detail&quot; section of the master/detail form. This works fine. The problem is that the user should be able to assign additional mental health orders, but the DataGridView does not display a blank row at the bottom in which to enter new data. The DataGridView's EnableUserToAddRows property is set to True. Is there something else I need to do?<br/><br/>Any help much appreciated.<br/><br/>Sol© 2009 Microsoft Corporation. All rights reserved.Sat, 19 Sep 2009 04:13:22 Zfe5fc375-f84d-42c2-a963-a6a93d72473fhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#fe5fc375-f84d-42c2-a963-a6a93d72473fhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#fe5fc375-f84d-42c2-a963-a6a93d72473fSol21http://social.msdn.microsoft.com/Profile/en-US/?user=Sol21Can't add a new record in a DataGridView in Master Details formHelp! Totally stuck with this problem...<br/><br/>I have a form bound to an entity (ClientAssessment). Each client assessment record may have multiple mental health disorders associated with it. I eager load these as part of the form's query using an Include statement and display them in a DataGridView as the &quot;detail&quot; section of the master/detail form. This works fine. The problem is that the user should be able to assign additional mental health orders, but the DataGridView does not display a blank row at the bottom in which to enter new data. The DataGridView's EnableUserToAddRows property is set to True. Is there something else I need to do?<br/><br/>Any help much appreciated.<br/><br/>SolThu, 18 Jun 2009 07:44:05 Z2009-06-18T07:44:05Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#74b97bae-9e71-4f29-9265-16303b70a7a3http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#74b97bae-9e71-4f29-9265-16303b70a7a3Sol21http://social.msdn.microsoft.com/Profile/en-US/?user=Sol21Can't add a new record in a DataGridView in Master Details form<p>Here's an update on this issue, I hope it might help anyone else experiencing this problem. I stumbled across a &quot;solution&quot; to this problem just by fiddling around - I don't really know why it works.<br/><br/>My DataGridView is bound to a navigation property of the &quot;master&quot; entity, so when I drag this property onto my Windows form Visual Studio adds a DataGridView and a corresponding BindingSource. The BindingSource has its AllowNew property set to True. However the DataGridView does not allow new records to be added. It turns out that if I change the AllowNew property of the BindingSource to False and then back to True again everything works fine. Interestingly, the property now appears in the property designer in bold, suggesting that this is not it's default setting.<br/><br/>I guess this means either that the AllowNew property defaults to True but for some reason has no effect, or that it's actually False by default but displays as True in the property designer. Either way, it sure looks like a BUG.<br/><br/>Cheers<br/><br/>Sol</p>Fri, 03 Jul 2009 00:15:03 Z2009-07-03T00:15:03Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#87bc881a-c469-413e-9a4a-d1df94500d86http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#87bc881a-c469-413e-9a4a-d1df94500d86Diego B Vegahttp://social.msdn.microsoft.com/Profile/en-US/?user=Diego%20B%20VegaCan't add a new record in a DataGridView in Master Details formHello Sol,<br/><br/>Sorry you didn't get an answer on this before. I can confirm that the workaround you have found is currently the best solution. We actually found this issue in WinForms databinding a few months ago and the WinForms team has created a fix that will be included in .NET 4.0.<br/><br/>The difference between the bold true and the non-bold true is that the non-bold true is simply the default value that the design-time components know should be applied, but it is never actually set. A bug in BindingSource was preventing it from detecting the databinding capabilities of the binding list provided by Entity Framework at runtime, and this was causing the unexpected behavior.<br/><br/>Thanks,<br/>Diego<br/><br/><hr class="sig">This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights.Mon, 06 Jul 2009 06:56:23 Z2009-07-06T06:56:23Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#920b10d1-de10-4003-9a45-d12d53cc6c80http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/fe5fc375-f84d-42c2-a963-a6a93d72473f#920b10d1-de10-4003-9a45-d12d53cc6c80Daríohttp://social.msdn.microsoft.com/Profile/en-US/?user=Dar%u00edoCan't add a new record in a DataGridView in Master Details formTray to set to true the  bindingsource.AllowNew property in the load event of the form<hr class="sig">Darío LeónSat, 19 Sep 2009 04:13:22 Z2009-09-19T04:13:22Z