Posted 6 November 2023, 2:21 am EST
I have converted some old spread7 to spread.net code. In this code I search for the row in which an empty string exists (old: lngRow = grdFLItemRow.SearchCol(1, 0, .MaxRows, “”, SearchFlagsNone)
new: grdFLItemRow.Search(1, string.Empty, false, false, true, false, 0, 0, grdFLItemRow.ActiveSheet.RowCount, 0, ref row, ref col);
However, this always returns -1 for the row.
But when I do in the immediate window (grdFLItemRow.ActiveSheet.Cells[1,0].Text).Equals(string.Empty) it returns true.
(first I searched for “” , and also in the immediate window , ?grdFLItemRow.ActiveSheet.Cells[1,0].Text → “” )
ActiveSheet =1
Why is the row not set to 1? in the search method?