New Row with Binding

Posted by: ddwyer on 8 September 2017, 1:06 pm EST

  • Posted 8 September 2017, 1:06 pm EST

    I am binding the grid to a datatable, but the datatable does not have rows. What I am not seeing is a grid row to add rows to the datatable-- the one with an asterisk on the row header. Only when I add a new row to the datatable do I see the grid row to add a row to the datatable.


     


    Is there a setting I am missing to show the grid row to add rows even when I have no rows in the datatable?

  • Replied 8 September 2017, 1:06 pm EST

    This functionality was not added until version 4.  You can use the DataAllowAddNew property.
  • Replied 8 September 2017, 1:06 pm EST

    Done. Still no love.
  • Replied 8 September 2017, 1:06 pm EST

    See the attached project which is working fine for me.

    2008/03/DataAllowAddNew.zip
  • Replied 8 September 2017, 1:06 pm EST

    Your app works nicely, thanks.


    What I was doing wrong was setting the property in the designer. When I have both the property in the designer and the property in code set to true, I don't get the new row. When I set the designer property to false and leave the code property true (as you did in your example) it works.


     


    That methodology is really annoying, to the point I would consider it a bug. If you expose a property in the designer, you should handle it appropriately.

  • Replied 8 September 2017, 1:06 pm EST

    I already set DataAllowAddNew to true with same result as above.
  • Replied 8 September 2017, 1:06 pm EST

    Make sure that line of code is set AFTER the lines of code you have to set up your data binding.
  • Replied 8 September 2017, 1:06 pm EST

    I will pass this along to the development team.
  • Replied 8 September 2017, 1:06 pm EST

    I discussed this with the developer and we are going to remove that property from the designer since it doesn't have any effect until after you set up your databinding so it makes no sense to set it there.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels