I have a BindingList bound to the grid. When i click on the template add row, a new object is added to the binding list. If i go directly to clicking a save button, the list still contains the empty item. The grid does not remove this empty item from the list unless I click somewhere else in the grid. Is there a call I can make so the grid removes this empty item from my binding list or do I have to handle checking for empty items and removing them myself? Thanks
What is your save button? If the button is a button control that takes focus, then the grid should take care of this automatically based on the UpdateMode property of the grid. By default, it will update on row change or lost focus.
I suspect your save button is probably a toolbar button and therefore does not take focus. So the grid doesn't know anything has happened. In which case, you will want to call grid.UpdateData before you do any kind of saving.
Hi Mike,
Yes the save button is on the toolbar. In the toolclick event, I calll grid.UpdateData() but there is no change in the number of rows in my list. I still get the blank row