Search text in Upward

Posted by: mohanmuthusamy on 8 September 2017, 1:12 pm EST

  • Posted 8 September 2017, 1:12 pm EST

    Dear Sir,
                  I write coding to find the text downward and return the row index. but i want to know to search text upward... to search text funtion in Downward as given below


    <span class="kwd">public int</span> FindTextDownward(FarPoint.Win.Spread.FpSpread fpSpread,<span class="kwd">string</span> FindString,<span class="kwd">bool</span> CompleteSearch)
    {
    <span class="kwd">int</span> RowIndex=0,ColIndex=0,SheetIndex=fpSpread.ActiveSheetIndex;
    <span class="kwd">if</span> (CompleteSearch)
    {
    SearchFlag=fpSpread.Search(SheetIndex,SheetIndex,FindString,<span class="kwd">false</span>,<span class="kwd">false</span>,<span class="kwd">false</span>,<span class="kwd">true</span>,<span class="kwd">true</span>,<span class="kwd">false</span>,<span class="kwd">false</span>,0,0,fpSpread.ActiveSheet.RowCount-1,0,<span class="kwd">ref</span> SheetIndex,<span class="kwd">ref</span> RowIndex,<span class="kwd">ref</span> ColIndex);
    <span class="kwd">if</span> (SearchFlag==FarPoint.Win.Spread.SearchFoundFlags.CellText)

    <span class="kwd">return</span> RowIndex;
    <span class="cmt"></span>
    <span class="kwd">return</span> RowIndex;
    }
    <span class="kwd">else</span>
    {
    SearchFlag=fpSpread.Search(SheetIndex,SheetIndex,FindString,<span class="kwd">false</span>,<span class="kwd">false</span>,<span class="kwd">false</span>,<span class="kwd">true</span>,<span class="kwd">true</span>,<span class="kwd">false</span>,<span class="kwd">false</span>,fpSpread.ActiveSheet.ActiveRowIndex,0,fpSpread.ActiveSheet.RowCount-1,0,<span class="kwd">ref</span> SheetIndex,<span class="kwd">ref</span> RowIndex,<span class="kwd">ref</span> ColIndex);
    <span class="kwd">if</span> (SearchFlag==FarPoint.Win.Spread.SearchFoundFlags.CellText)
    <span class="kwd">return</span> RowIndex;
    <span class="kwd">return</span> RowIndex;
    }
    }
     
  • Replied 8 September 2017, 1:12 pm EST

    It is not possible at this time to do a bottom to top search.  I have asked the developer to add it as an enhancement for a future version.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels