I am glad that you found the solution. By flushing the data to the database you(as the name suggests) flush the data to the database but the transaction is not committed yet. Also the primary key, if database server calculated, is then obtained from the database. You can find more details here.
Feel free to ask in case you have any other question.
the Telerik team