Invalid Index specified -58 (current length is 2) while changing sort between 2 columns

Posted by: bhumika42 on 8 September 2017, 1:43 pm EST

  • Posted 8 September 2017, 1:43 pm EST

    Hi,


         I have provided autosort on all colmns in subgrid. According to navigation in MainGrid , data is changed in subgrid. When I change sort from 1 column to other column (especially in case of descending ) it gives error that "Invalid Index specified some no. (current length is some no.) . I need this sorting in this case. So how to come out of this error.

  • Replied 8 September 2017, 1:43 pm EST

    Hello,


    First of all, make sure you are using the latest maintenance release of Spread for Windows Forms. If you are, then try debugging the line of code that is throwing this error, so you can see what is causing this bad index to be passed in.

  • Replied 8 September 2017, 1:43 pm EST

    Hi,


       I am using FarPoint Spread for Windows forms vs2005 v2.5.2005 . The Error lies with when i set Datasource using .DataSource method.

  • Replied 8 September 2017, 1:43 pm EST

    Hello,


    Is the Spread still sorted when you are setting the DataSource? If so, make sure you remove the sort or Reset the Spread before setting the DataSource. Also downloading the latest maintenance release should fix this issue as well.

  • Replied 8 September 2017, 1:43 pm EST

    Thanks.


          Resetting the Farpoint grid before setting new datasource removed the error.

  • Replied 8 September 2017, 1:43 pm EST

    Ya, while setting new database sorting was already there. So reseting the grid , setting new datasource and then again providing sorting did worked.

Need extra support?

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

Learn More

Forum Channels