Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1050
problem adding new records
posted

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.AllowAddNew =
true;

dg.FieldLayoutSettings.AddNewRecordLocation = AddNewRecordLocation.OnTopFixed;

any advice?

Parents
No Data
Reply
  • 3627
    posted

    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.

Children