How to loop the Datagridview Cells and Save the Misspelled text in SQL SERVER Database table

Viewed 20

Save the corrected text back to the database after the user has spell checked it

I have 3 Columns Source,Description and Item Id.
I want to loop Source and Description Columns in Datagridview. And these two columns are looping for spellCheck.
When i SpellChecked the Columns The Mispelled Words are shown in the RapidSpell Dialogue Box But I dont Know  how to  update the misspelled word in database table.

I have tried below code in GridView_CellValueChanged event to update Misspelled Words in database. vb.net

Dim command As New SqlCommand
        Dim index As Integer
        Dim UDescription As String
        Dim USource As String
        objcnn.Open()
        UDescription = gvInsuredData.Rows(2).Cells("DescriptionProperty").Value
        USource = gvInsuredData.Rows(2).Cells("SourceProperty").Value
        command = New SqlCommand("update tblInsuredPersonal set personalPropertyDescription='" & UDescription & "', personalPropertySource='" & USource & "' where ClaimID = " & ClaimID & " and personalPropertyItemID=15 ", objcnn)
        command.ExecuteNonQuery()
        objcnn.Close()

But i need to update only misspelled word automatically without mentioning itemId value.

Note: I'm using Keyoti RapidSpell Tool for SpellCheck Gridview.

0 Answers
Related