Duplicate rows - Far Point Issue in Grid

Posted by: arun on 8 September 2017, 2:30 pm EST

  • Posted 8 September 2017, 2:30 pm EST

    Hi,


    We have got one issue in far point grid V2.5.


    When we try to search for a name in the grid i'm getting the error as follows. This error exists only for the first 15 rows. the screen shows total of 24 rows at a time.


    First I performed search by giving "AMC" in the Search textbox


    - It will highlight 1st record


    Then I performed search by giving "AMC Cent" in the Search textbox


    - It will highlight "AMC Century City Theater #1" record.


    Then again, Type in: "AMC"


     


    Another one:-


    When we typ "ahmet" in the search box and we continously press back space it will go and highlite the 1st record which starts in the letter "a".


    Then that row gets duplicaated with the same index number.


    We Observered that it displays duplicate records as selection.
    It shows the same number of records which were hidden above as duplicates.


    Do we have any limitation with the grid that we are using and we need to know what version of spread grid has the fix for this.


    Thanks,


    Arun

  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    Could you please tell me what method are you using to perform your search with Spread sheet?

     

    Thanks,

     

  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    Instead of  setting the top row you may highlight and show the searched cell as:

                fpSpread1.ActiveSheet.SetActiveCell(5, 11);
                fpSpread1.ShowCell(0, 0, 5, 11, FarPoint.Win.Spread.VerticalPosition.Top, FarPoint.Win.Spread.HorizontalPosition.Left);

    Let me know if that doesn't help you.

     

    Thanks,

     

  • Replied 8 September 2017, 2:30 pm EST

    Hi,


    We were not able to set as FarPoint.Win.Spread.VerticalPosition.Top, FarPoint.Win.Spread.HorizontalPosition.Left, if we are setting the grid gets hangged.


     For this we have altered the code like below.


    Ex:-


    grid.ShowCell(0, 0, foundRow, 0, FarPoint.Win.Spread.VerticalPosition.Center, FarPoint.Win.Spread.HorizontalPosition.Center)


    If we are using like this we are getting the rows dupliated.


    Thanks,


    Arun

  • Replied 8 September 2017, 2:30 pm EST

    Hello,

    I am not sure why the Spreadsheet gets hanged while showing the cell, Could you please provide me a small sample application so that I can test this at my end?

     

    Thanks,

     

  • Replied 8 September 2017, 2:30 pm EST

    Hi,


    We will not be able to give a sample application.


    The code is being called in the thread, is there any restrictions for it.


     Thanks,


    Arun

  • Replied 8 September 2017, 2:30 pm EST

    Hi


    After doing search we are doing the following code to set the desired row to be highlited.


    Example:-


    In screen total number of rows displayed is 25, so top row is 0 and bottom row is 25.


    But the search value resides in the row just keep any one 5 - 11, if so it duplicates and the records and displayed twice.


    Example Code:-


    Dim viewportMidpointRow As Integer = CType(((grid.GetViewportBottomRow(0) - grid.GetViewportTopRow(0)) / 2 - 1), Integer)
            If viewportMidpointRow > foundRow Then
                viewportMidpointRow = 0
            End If
            grid.SetViewportTopRow(0, foundRow - viewportMidpointRow)



    Thanks,
    Arun

  • Replied 8 September 2017, 2:30 pm EST

    SetViewportTopRow is causing this duplication of rows
  • Replied 8 September 2017, 2:30 pm EST

    Arun,


    If the code is being called in a seperate thread, you need to make sure you are making a safe call by using a delegate. Take a look at the following thread for information how to implement this.

Need extra support?

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

Learn More

Forum Channels