DataGrid NullText Issue!!!

MadMaxx

Active member
Joined
Nov 16, 2003
Messages
37
Hey all.


Im having an issues with a datagrid. I have a datagerid setup that allows the user to make changes of the data that is populated. The edit and delete functions work fine as does the insert for the most part.

The problem Im having is that when the user clicks a button the datagrid makes room for a new row. When the user clicks in the new row all of the cells are then filled with the value I set in the NullText property for each column. When user has finished and clics the save button for the new record andything the user actually typed in is save where as if the user just tabbed to the next field(meaning the nulltext value is correct) doesnt get saved. It shows up int he database as NULL where it should be the value I set.

Any ideas?
 
[VB]
If SQLDSCustomSettings.HasChanges Then
Create the UPDATE command.
SQLDACustomSettings.UpdateCommand = SQLCBCustomSettings.GetUpdateCommand
Update the database with new changes.
SQLDACustomSettings.Update(SQLDSCustomSettings, "ProgramSettings")

Create the DELETE command.
SQLDACustomSettings.DeleteCommand = SQLCBCustomSettings.GetDeleteCommand
Update the database with the new changes.
SQLDACustomSettings.Update(SQLDSCustomSettings, "ProgramSettings")

Create the INSERT command.
SQLDACustomSettings.InsertCommand = SQLCBCustomSettings.GetInsertCommand
Update the database with the new changes.
SQLDACustomSettings.Update(SQLDSCustomSettings, "ProgramSettings")

Call function to set the forms controls.
Call BrowseMode()

Else
Call function to set the forms controls.
Call BrowseMode()
End If


SQLDACustomSettings.InsertCommand = SQLCBCustomSettings.GetInsertCommand
SQLDACustomSettings.Update(SQLDSCustomSettings, "ProgramSettings")
[/VB]
 
Back
Top