How to get a specified row focused(selected)?

Posted by: goodssh on 8 September 2017, 3:05 pm EST

  • Posted 8 September 2017, 3:05 pm EST


    It's been a long time and now I have a small issue. 

    <span style="font-size:10pt;">I'd like to make a specified row focused, which looks like you clicked that row and the row is obviously selected by the click event.</span>

    <span style="font-size:10pt;"></span><span style="font-size:10pt;"> </span>

    <span style="font-size:10pt;">I found SetActiveCell() but it doesn't seem to work when I do as follows.</span><span style="font-size:10pt;"> </span>

    <b>MySpread.ActiveSheet.SetActiveCell(MyDictionary["SpecialID"], 0); // MyDictionary's indexer returns a integer value between 0 ~ 250000.
    MySpread.ShowRow(0, MyDictionary["SpecialID"], FarPoint.Win.Spread.VerticalPosition.Top);</b>

    <span style="font-size:10pt;">The row I wanted to get affected is shown by ShowRow().
    </span><span style="font-size:10pt;">However, it is not "selected" yet because SetActiveCell() somewhat doesn't work.</span>

    It would be truly appreciated if you can help me figure out what I'm missing.

    <span style="font-size:10pt;">Thanks in advance. </span>

  • Replied 8 September 2017, 3:05 pm EST


    You would need to add the specific row to the selected rows collections to show it as a selected row. You can accomplish the same using the AddSelection method. Please have a look at the attached sample that depicts the same.

    Hope it helps. Please let me know if I missed something.


    Manpreet Kaur

  • Replied 8 September 2017, 3:05 pm EST

    This works perfectly for me. 


    Thank you so much. 

Need extra support?

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

Learn More

Forum Channels