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

    <p>Hi. </p><p>It's been a long time and now I have a small issue. </p><p><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></p><p><span style="font-size:10pt;"></span><span style="font-size:10pt;"> </span></p><p><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></p><p><b>MySpread.ActiveSheet.SetActiveCell(MyDictionary["SpecialID"], 0); // MyDictionary's indexer returns a integer value between 0 ~ 250000.<br>MySpread.ShowRow(0, MyDictionary["SpecialID"], FarPoint.Win.Spread.VerticalPosition.Top);</b></p><p><span style="font-size:10pt;">The row I wanted to get affected is shown by ShowRow().<br></span><span style="font-size:10pt;">However, it is not "selected" yet because SetActiveCell() somewhat doesn't work.</span></p><p>It would be truly appreciated if you can help me figure out what I'm missing.</p><p><span style="font-size:10pt;">Thanks in advance. </span></p>
  • Replied 8 September 2017, 3:05 pm EST

    <p>Hello,</p><p>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.</p><p>Hope it helps. Please let me know if I missed something.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
  • Replied 8 September 2017, 3:05 pm EST

    <p>This works perfectly for me. </p><p> </p><p>Thank you so much. </p>
Need extra support?

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

Learn More

Forum Channels