Working with samples that implement a ComboBox in a DataGrid. Things work fine until the last (new) row. If you type in a TextBox field, a new row is added at the first keystroke. But if you use the ComboBox as the first field in the row, the results are not saved (the Commit function not called).
Any ideas on how to repair this problem?
I think the FAQ sample has been updated to handle this problem.
BRBrocky October 8, 2002 09:24 AM UTC
I had the same problem. I had to made a littel change in the coloumn style:
protected override void Edit(System.Windows.Forms.CurrencyManager source, int rowNum, System.Drawing.Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible)
//on very first pass, set this static member to number of items in tables
if(_RowCount == -1)
_RowCount = source.Count - 1;
I added the "- 1" statement in the edit override. The problem only accurs whe u hit the first time the new colum