use something like:
GridViewItem.Rows[0].Cells[1].ToString().Replace("'","''")
or maybe
GridViewItem.Rows[0].Cells[1].ToString().Replace("'","\'")
I'm not really sure because of the many sql languages, but you can easily try one of these and see what happens