Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey all.

 

 

I'm 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 I'm 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) doesn't get saved. It shows up int he database as NULL where it should be the value I set.

 

Any ideas?

  • 2 weeks later...
Posted
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")

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...