I have a datagridview with the following columns on it: FirstName, LastName, UserName.
When the user adds a new row to the datagrid, to create a new user, I automatically begin editing in the FirstName cell. However, I want the UserName to be updated as the user types into the FirstName and LastName fields in order to provide a default user name. (This only occurs for new users - existing users do not automatically update the UserName)
The default UserName should be the FirstName + the first character of LastName.
Is there any way to get the UserName cell to automatically update as the user is typing in the FirstName or LastName fields? This is a databound datagridview, with appropriate DevForce Binding Source and DGVBM.
I have attached to the TextChanged event of the edit control that appears for in-cell editing, and I can read cell value as it changes, but whenever I try to set the value of the UserName field (either through the grid or through the binding source), the editing cell and the UserName cell get blanked out, I recieve extra TextChanged events that and the edit control is blanked out as well.
I'm sure I'm pretty close, but there's just some piece of the puzzle that I'm missing!