From 4af0ec6f96a9313bb1cdea9c278f776e5097b592 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 20 Dec 2023 10:19:02 +0100 Subject: [PATCH] fixed Bug in the Edit Cell dialog --- instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb index c8c84549d30..3b664233955 100644 --- a/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb +++ b/instat/UserControls/DataGrid/ReoGrid/ucrReoGrid.vb @@ -219,8 +219,8 @@ Public MustInherit Class ucrReoGrid Private Function GetRowIndex(currWorkSheet As Worksheet, strRowName As String) As Integer If currWorkSheet IsNot Nothing Then For i As Integer = 0 To currWorkSheet.Rows - 1 - Dim strCol As String = currWorkSheet.RowHeaders(i).Text - If strCol = strRowName Then + Dim strCol As String = currWorkSheet.RowHeaders(i).Text - 1 + If CInt(strCol) = CInt(strRowName) Then Return i End If Next @@ -234,7 +234,7 @@ Public MustInherit Class ucrReoGrid If strColumnHeader.Contains("(") Then strColumnHeader = strColumnHeader.Split("(")(0) End If - Dim iRowIndex = GetRowIndex(grdData.CurrentWorksheet, iRow) + 1 + Dim iRowIndex = GetRowIndex(grdData.CurrentWorksheet, iRow) If strColumnHeader.Trim = strColumn _ AndAlso iRowIndex > -1 Then Return grdData.CurrentWorksheet(iRowIndex, i).ToString()