none
Invisible Electronic Signature RRS feed

  • Question

  • I have been having problems with getting an electronic signature into a column in a table.  It took me awhile, but I finally goterdone.  However, now that the signature is actually there, I am unable to get it to display in the DGV on the form. 

    I have checked to make sure that I haven't set the cell forecolor/backcolor properties such that the value is not visible, and am pretty sure I have managed not to do that yet again.

    Anyway, here is the process and the code that is supposed to make it all happen.

    So in this first screen a user has logged on and has opened a DGV to see if there are any records that require signature.  The user would click the Review CRs button and a query is run to show all records that this user has not yet signed.

    The User then will see all records that require their signature.  The user then would select one of the records by double clicking in the row of the record of interest.

    A Windows Explorer is opened (not shown since everyone has seen millions of them) to the directory that is associated with the selected record.  Behind that is the DGV form below.  At this point the DGV.Enabled = False.

    The user would then Click the Sign CRs button and that will enable the DGV and the user can then input their electronic signature, which is accomplished by double clicking in the displayed row.

    At the point where the user double clicks to insert their electronic Signature the following code is executed

                            Dim Signature As String = CType(_strEmployeeName & " " & CStr(Date.Now), String)
                            dgvListTable.Rows(0).Item(6) = Signature
                            lblRecords.Text = dgvListTable.Rows.Count.ToString 'Record count
                            dgvListManager = DirectCast(BindingContext(dgvListTable), CurrencyManager)
                            dgvListManager.EndCurrentEdit()
                            dgvListAdapter.Update(dgvListTable)
    

    At this point the Signature is inserted into the record and it is saved, which does occur.  However, the signature does not show up in the DGV on the screen.  I have done everything I can think of, so far, and none of them work, including the most far fetched ideas I often try.

    So how do I make the signature show up?


    gwboolean

    Friday, July 12, 2019 5:40 PM

Answers

  • Sigh.... I finally figured out my real problem, fixed it and am ready to move on.  I would have preferred to let this go without acknowledging that I am not the sharpest tool in the shed, but the solution was simple, (unless you are me).So I admit I should have seen this and then skulk away with my tail between my legs.

    Anyway, what was required was to re-query the table after inserting the value into the column in the DGV.


    gwboolean

    • Marked as answer by gwboolean Wednesday, July 24, 2019 10:13 PM
    Wednesday, July 24, 2019 10:12 PM

All replies

  • Hi,

    try to add code:

    Dim Signature As String = CType(_strEmployeeName & " " & CStr(Date.Now), String) dgvListTable.Rows(0).Item(6) = Signature lblRecords.Text = dgvListTable.Rows.Count.ToString 'Record count dgvListManager = DirectCast(BindingContext(dgvListTable), CurrencyManager) dgvListManager.EndCurrentEdit()

    Dim SQLCommandBuild As SqlCommandBuilder = New SqlCommandBuilder(dgvListAdapter) dgvListAdapter.Update(dgvListTable)

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 15, 2019 1:58 AM
    Moderator
  • Thanks Alex.  I will give this a try just as soon as I can get to it.

    gwboolean

    Wednesday, July 17, 2019 6:33 PM
  • Thanks Alex.  I will give this a try just as soon as I can get to it.

    gwboolean

    Hi,

    If you have anything else about this issue, please feel free to contact me.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 19, 2019 1:52 AM
    Moderator
  • I gave it a shot and moved that line down to where you suggested.  Same result.  I have temporarily commented out the EndEdit and the Update until I can get the signature to display.

    gwboolean

    Friday, July 19, 2019 8:29 PM
  • I gave it a shot and moved that line down to where you suggested.  Same result.  I have temporarily commented out the EndEdit and the Update until I can get the signature to display.

    gwboolean

    Hi,

    give you my complete code:

    Imports System.Data.SqlClient
    Public Class Form1
        Dim sda As SqlDataAdapter
        Dim CommandeSQLSelect As String
        Private Bind As New BindingSource
        Dim dt As DataTable = New DataTable
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            Dim constr As String = "Data Source = (localdb)\MSSQLLocalDB; Integrated Security = True ;AttachDbFileName= C:\Users\alexl2\Desktop\DataBase\Alex\alex.mdf"
            Dim ConnectionSQL As SqlConnection = New SqlConnection(constr)
            CommandeSQLSelect = "Select * From Student"
            sda = New SqlDataAdapter(CommandeSQLSelect, ConnectionSQL)
            sda.Fill(dt)
            Bind.DataSource = dt
        End Sub
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim SQLCommandBuild As SqlCommandBuilder = New SqlCommandBuilder(sda)
    
            dt.Rows(0).Item(1) = "alex1"
            sda.Update(dt)
        End Sub
    End Class
    
    

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, July 22, 2019 6:27 AM
    Moderator
  • Sigh.... I finally figured out my real problem, fixed it and am ready to move on.  I would have preferred to let this go without acknowledging that I am not the sharpest tool in the shed, but the solution was simple, (unless you are me).So I admit I should have seen this and then skulk away with my tail between my legs.

    Anyway, what was required was to re-query the table after inserting the value into the column in the DGV.


    gwboolean

    • Marked as answer by gwboolean Wednesday, July 24, 2019 10:13 PM
    Wednesday, July 24, 2019 10:12 PM