Searching Functionality in Hierarchical view

Posted by: arunkumar on 8 September 2017, 2:17 pm EST

  • Posted 8 September 2017, 2:17 pm EST


    Hi,


    Can some one please helpme to find a search functionality of a text/number in hierarchical view for a particular column.


    The following code is working only parent level but it needs to search all the levels and should show the search value existing cell. 


     


     


    int intColIndx = fpSpreadRangeDecision.ActiveSheet.ActiveColumnIndex;


    if (intColIndx == -1)


    return;


    m_strSearchTxt = InputText.ToUpper();


    for (int intRowIndx = fpSpreadRangeDecision.ActiveSheet.ActiveRowIndex + 1; intRowIndx < fpSpreadRangeDecision.ActiveSheet.RowCount; intRowIndx++){


           strCurrTxt = fpSpreadRangeDecision.ActiveSheet.Cells[intRowIndx, intColIndx].Text.ToString().ToUpper();


           if (strCurrTxt != null && (strCurrTxt.Length >= m_strSearchTxt.Length) && (strCurrTxt.Substring(0, m_strSearchTxt.Length) == m_strSearchTxt))


            {


                     fpSpreadRangeDecision.ActiveSheet.SetActiveCell(intRowIndx, intColIndx);


                    fpSpreadRangeDecision.ShowCell(0, 0, intRowIndx, intColIndx, FarPoint.Win.Spread.VerticalPosition.Bottom, FarPoint.Win.Spread.HorizontalPosition.Right);


                blnFound = true;


                break;


    }


     


    Thanks in advance,

  • Replied 8 September 2017, 2:17 pm EST

    Hello,


    You need to iterate through all the rows in childView as well and search accordingly. You can have a look at this post.


    Thanks.

Need extra support?

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

Learn More

Forum Channels