Results 1 to 3 of 3

Thread: how to sort values of multiple columns on user defined events

  1. #1
    Junior Member
    Join Date
    Mar 2008

    Smile how to sort values of multiple columns on user defined methods

    I have the Objective Grid 11.0.0. I want the elements in the grid to be sorted based on multiple column keys that i'll send at runtime. I want to do this in c# .net 2.0 framework.

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Review the Tecnical Access Center (TAC) Stingray articles and samples at under the title Stingray® Studio 2006 MFC Project Integration with .NET. Also, please take a look at the Online OG help, ogug.chm or ogref.chm in <Stingray install directory>\Docs on the subjects:
    CGXGridCore::SortRows and CGXSortInfo. Also, check out the sample, <Stingray install directory>\Samples\Grid\General\GridApp, which ships with Objective Grid.
    In most cases, you can just use the grid's SortCols() and SortRows() methods, as they will usually handle all of the details associated with the sort.

    See the NOTE: in this example,

    BOOL C<YourGrid>View::OnLButtonClickedRowCol(ROWCOL nRow, ROWCOL nCol, UINT nFlags, CPoint pt)
    if (nRow == 0 && nCol > 0 )
    CGXSortInfoArray sortInfo;
    sortInfo.SetSize(1); // only 1 column (NOTE: You can also sort by several columns)
    sortInfo[0].nRC = nCol;
    sortInfo[0].sortType = CGXSortInfo::numeric;
    sortInfo[0].sortOrder = CGXSortInfo::descending;
    SortRows(CGXRange().SetTable(), sortInfo);
    return TRUE;

    (IntRef 1153559)

  3. #3
    Please, see Using Objective Grid with C++/CLI on to learn how to use OG 11 and later versions in C#

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts