with normal table data, i am able to add new records.
if i am using ObservableCollection as datasource...binding.
on addbutton click i am writing this code...but, still its not showing(not even the plus sign) the empty record template to enter new data.
dg.FieldLayoutSettings.AddNewRecordLocation = AddNewRecordLocation.OnTopFixed;
any advice?
Hi,
I can not say what's wrong with your application as you haven't attached any sample application.However, I could suggest you the following.
1. Take a look at Adding Records at http://help.infragistics.com/Help/NetAdvantage/WPF/2008.1/CLR3.X/html/xamData_Adding_Records.html and Adding, Updating, and Deleting Records in xamDataGrid athttp://help.infragistics.com/Help/NetAdvantage/WPF/2008.1/CLR3.X/html/xamDataGrid_Adding_Updating_and_Deleting_Records_in_xamDataGrid.html
Take note of the requirement that adding records is supported only if the data source implements the IBindingList interfaceand returns True from its AllowNew property.As an alternative to implementing the complete IBindingList interface, you could use BindingList(T) that provides a concrete,generic implementation of the IBindingList interface.I advise you to substitute ObservableCollection for BindingList<T> in your application, then check the final result.
You can also take a look at the Unable to get Add New Row functionality to appear forum discussion at http://forums.infragistics.com/forums/t/12405.aspx
2. Become familiar with the Add Record sample in the NetAdvantage for WPF xamFeatureBrowser(NetAdvantage for WPF 2008 Volume 1)NetAdvantage for WPF xamFeatureBrowser->xamDataGrid->Layout and Behaviour->Add Record
Best Regards,Yanko
I am using the grid to add,edit,delete the records.
I am getting data into observablecollection and then giving it to grid as datasource.
if user enter new record, with a query in the dg_updated event to update the database.
but, if i use the observablecollection as datasource for the grid, the new record template is not appearing at all.
i have no possibility to enter new record in the template. no plus sign to enter the data...no new empty row appears.
am i clear in explaining? if not drop message.
Your sample code implies you're trying to use the grid UI to let the user edit/add records, but your wording implies you want to add an item to the underlying collection.
I haven't messed with using the grid to edit/add new records (ui-wise), but If you add an item to the underlying collection that your grid's bound to, the record will automagically appear in the grid.
If you don't have the hotfix installed and you're using grouping, a bug will cause your grid to clear out. The hotfix fixes this perfectly.