Need help on Spread COM Properties Equivalents in Spread .NET V11.

Posted by: nchinta1 on 16 July 2018, 8:48 pm EST

  • Posted 16 July 2018, 8:48 pm EST

    Hi Team,

    We are migrating our project from VB6.0 to VB.NET 4.7 .
    We are updating Spread .NET V11 from Spread COM 2.5.
    But there are many changes in the code when we upgrading SPread .NET 11.
    Spread properties has been changed and I want to know the Spread .NET 11 Properties of Spread COM 2.5

    I already gone through below URL , But I couldn't find the properties which I want update in the code.

    http://help.grapecity.com/spread/SpreadNet11/WF/webframe.html#spwin-comequivalents.html

    Spread1.ActiveSheet.ActiveRowIndex = 1
    Spread1.ActiveSheet.ActiveRowIndex2 = i
    Spread1.ActiveSheet.ActiveColumnIndex = 1
    Spread1.ActiveSheet.ActiveColumnIndex2 = Spread1.ActiveSheet.ColumnCount
    Spread1.BlockMode = True
    Spread1.SortBy = 0 'sort by cols
    Spread1.SortBy = 0 'sort by rows
    Spread1.set_SortKey(1, 2) 'name column
    Spread1.set_SortKeyOrder(1, 1) 'ascending key 1 order
    Spread1.action 25


    Thank You..
    Naresh Chintala
  • Marked as Answer

    Replied 16 July 2018, 10:53 pm EST

    Hi Naresh,

    As per the documentation to sort a range of cells you can use SortRange method with Spread .NET. You can use the code as follows if you working with the unbound data:

    FarPoint.Win.Spread.SortInfo[] sort = new FarPoint.Win.Spread.SortInfo[1];
    // for sortkey and sortorder , initialize the sortinfo object with specified index and order whether ascending
    sort[0] = new FarPoint.Win.Spread.SortInfo(0, true, System.Collections.Comparer.Default);
    fpSpread1.ActiveSheet.SortRange(1, i, 1, fpspread1.ActiveSheet.ColumnCount-1, true, sort);

    I would suggest you to go through the documentation to understand the Sorting with Spread for WinForms here:
    http://help.grapecity.com/spread/SpreadNet11/WF/webframe.html#spwin-sorting.html


    Thanks,
    Deepak Sharma
Need extra support?

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

Learn More

Forum Channels