Devexpress gridview add blank row

723 Views Asked by At

picture_DevExPressGridviewAddblankRow

Hello,

As you can see at attached screenshot, I want to add new row to bottom. ( NewItemRowPosition = Bottom, Edit = true, etc.. but doesn't work.)

Please help me.

Thanks, Best Regards.

2

There are 2 best solutions below

0
On

It is not possible to display the New Item Row in conjunction with a GridControl that does not have a data source. Per the New Item Row documentation:

[T]he new item row - a row that allows end-users to add new records. Note that this row can only be used if the data source supports the addition of new rows (for instance, when your data source implements the IBindingList interface and the IBindingList.AllowNew property value is true).

So in a nutshell: no data source = no New Item Row.

0
On

In gridview properties you should do following:

  1. OptionsNavigation - AutoFocusNewRow = true
  2. OptionsView - NewItemRowPosition = Bottom
  3. OptionsBehaviour.Editable = true

And of course gridview should have datasource binded