It will select all records after clicking sort indicator

Posted by: fleming7612 on 8 September 2017, 1:10 pm EST

  • Posted 8 September 2017, 1:10 pm EST


    I want to show the row user clicking on to red.

    set SelectionBackColor = Red

         SelectForeColor = Yellow

         SelectionStyle= SelectionColors



    It seems ok while I clicked the sort indicatior. It turns all records to Red.

    I think only one record will be red , no matter whether I am clicking the sort indicator or not.

    Any suggestion will be appreciated.


  • Replied 8 September 2017, 1:10 pm EST

    I'm not sure what it is you are trying to do here and how the sort indicator fits into the mix.  Are you just wanting the row you click on to turn red?  Where are you setting this code?
  • Replied 8 September 2017, 1:10 pm EST

    Yes, I just want the row I click on to turn red.

    I set it in the FPSpread_Sheet

  • Replied 8 September 2017, 1:10 pm EST

    This code is working for me...

    FpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.SingleSelect
    FpSpread1.ActiveSheet.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.SelectionColors
    FpSpread1.ActiveSheet.SelectionBackColor = Color.Red

  • Replied 8 September 2017, 1:10 pm EST

    Right! How about try to click the sort indicator. It will turn the whole sheet to red.
  • Replied 8 September 2017, 1:10 pm EST


    When you set the SelectionUnit to Row, you always will have entire row(s) selected, so clicking a column header (sort indicator), will select the column, which will cause every row to be selected making it appear as the entire Spread is selected. What do you want to do with the selection when a column is selected?

  • Replied 8 September 2017, 1:10 pm EST

    Thank you for your supports so quickly ^_^

    Our sheet will hightlight the record (backcolor to red) after user click any record.

    We also set sort indicator on the column header. 

    User maybe click specific record then click the sort indicator.

    At that time, the whole sheet will turn to red and user's focusing record disappear.

    Cause I am not native English speaker, so please forgive my poor English ability.

    Thank you very much

  • Replied 8 September 2017, 1:10 pm EST


    You can write code like the following to remove the selection of all the rows.

    	<SPAN class=kwd>Private Sub</SPAN> FpSpread1_AutoSortedColumn(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.AutoSortedColumnEventArgs) <SPAN class=kwd>Handles</SPAN> FpSpread1.AutoSortedColumn
    <SPAN class=kwd>End Sub</SPAN>
  • Replied 8 September 2017, 1:10 pm EST

    Thank you.

    with your good supports , I don't afraid I can't make good use of  the number one spred sheet.


Need extra support?

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

Learn More

Forum Channels