Avatar of mustish1
mustish1
 asked on

Values only change when i use the mouse

Hi guys: Is there any way I can change these values by means of using the arow keys as right now they only change in the textboxes when I use the mouse.

Thanks

s
    Public Sub Get_Weights(Active_Status)
        DataGridView1.DataSource = "null"
        sDataBaseString(2) = "data source=175.16.64.3;user id=sa;password=;initial catalog=processtwo"
        Dim strConnection As String = sDataBaseString(2)
        Dim cn As SqlConnection = New SqlConnection(strConnection)
        Dim bSource As New BindingSource
        DataGridView1.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
        Try
            cn.Open()
            query = "select BarcodeType as Tank, Active as Active, Description as Description, ContractWeight as 'Contract Weight', ComponetWeight as 'Component Weight', WatchTolerance as 'Watch Tolerance', LimitTolerance as 'Limit Tolerance', convert(float, ComponetWeight)+convert(float, ContractWeight) as 'Target Weight' from Weights " & Active_Status
            command = New SqlCommand(query, cn)
            sda.SelectCommand = command
            sda.Fill(dbDataSet)
            bSource.DataSource = dbDataSet
            DataGridView1.DataSource = bSource
            'sda.Update(dbDataSet)
            command = New SqlCommand(query, cn)
            reader = command.ExecuteReader
        Catch ex As SqlException
            MessageBox.Show(ex.Message)
        Finally
            cn.Dispose()
        End Try

    End Sub

Open in new window

Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
Mike Eghtebas

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike Eghtebas

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy