Hierarchical vs SetActiveCell

Posted by: david on 2 October 2023, 11:07 pm EST

    • Post Options:
    • Link

    Posted 2 October 2023, 11:07 pm EST

    Hello,

    I can’t activate a line in a childview

    I used :

    SheetView sheetChild = Grd_Sheet1.GetChildView(1, 0);
    sheetChild.AddSelection(1, 1, 1, 1);
    sheetChild.SetActiveCell(1, 1);
    Grd.Focus();

    How can I Do ?

    thanks

  • Posted 3 October 2023, 7:49 pm EST

    Hi David,

    We are in discussions with the developers regarding this issue. [Internal Tracking ID: SPNET-34081]

    We will update you on this as soon as we hear back from them.

    Thanks & Regards,

    Aastha

  • Posted 10 October 2023, 11:42 pm EST

    Hi David,

    As per the current behavior of FpSpread control, spread can only paint the active cell in the active SpreadView. Therefore, we have to change the active spread view to paint the active cell in the child view. Please refer to the following code snippet to bring focus to the active cell in the child grid:

     SheetView sheetChild = fpSpread1.ActiveSheet.GetChildView(1, 0);
     SpreadView spreadView = fpSpread1.GetRootWorkbook().GetSpreadView(sheetChild, 0, 0);
     fpSpread1.GetRootWorkbook().SetActiveWorkbook(spreadView);
     sheetChild.SetActiveCell(1, 2);

    Kindly refer to the attached sample for full implementation. (See HierarchyScroll_FocusS.zip)

    Thanks & Regards,

    Aastha

  • Posted 11 October 2023, 2:32 am EST

    works well

    thanks

Need extra support?

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

Learn More

Forum Channels