When my datagrid loads, the newrow row is not showing. It only shows after I click on one of the headers. After that it works fine, and correctly adds new records. I'm using the express 2008.2 version. Here's my current code:
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AllowAddNew="True" AllowDelete="True" SummaryDescriptionVisibility="Collapsed" AutoGenerateFields="False" HighlightAlternateRecords="True" GroupBySummaryDisplayMode="Default" AddNewRecordLocation="OnBottom" />
</igDP:XamDataGrid.FieldLayoutSettings>
I think one needs to add AllowAddNewDefault="Yes" property inside DisplayLayout.
I have the same problem. We've been living it with it for a while now. Low priority, but I reported this over a year ago.
Thanks Alex. I submitted it as a support request. Unfortunately, adding a blank dummy element to the list will not work in my scenario, as we need to track any and all changes made by the user to the underlying collection.
Hi,
We reproduced the situation but cannot determine whether this is incorrect behavior or is just missed scenario. I can offer you a workaround or you can submit it as a request.
The workaround is :
1) remove from the grid:
AllowAddNew="True" AddNewRecordLocation="OnTopFixed"
2) Add a blank dummy element in the collection:
WorkingList1.Add(new DeleteableChar());
3) Handle the RecordUpdated event like this:
private void CharacteristicsGrid_RecordUpdated(object sender, Infragistics.Windows.DataPresenter.Events.RecordUpdatedEventArgs e) { CharacteristicsGrid.FieldLayoutSettings.AllowAddNew = true; CharacteristicsGrid.FieldLayoutSettings.AddNewRecordLocation = Infragistics.Windows.DataPresenter.AddNewRecordLocation.OnTopFixed; }
Hope this helps and is appropriate in your scenario,
Alex.
I tried the collections that implement that interface (as in the code snippet below), but still have the same problem.
WorkingList1 = new BindingList<DeleteableChar>();WorkingList2 = new BindingListCollectionView(new BindingList<DeleteableChar>());WorkingList3 = new ListCollectionView(new List<DeleteableChar>());
I have attached a sample with three grids bound to three different collection types. When loaded, none of the AddNew rows are visible. If you resize the window though, the AddNew rows then show up.
Alex/Infragistics, are you able to reproduce the problem with the samples uploaded?