True Db Grid winforms edition grid column order

Posted by: kshitizkumar on 13 June 2019, 3:14 am EST

    • Post Options:
    • Link

    Posted 13 June 2019, 3:14 am EST

    Hi,

    I am working on a migration project from vb6 to c#.net

    In vb6 version of the application truedb grid activeEX version was used and in the .net application we are using winforms edtition of the grid.

    In the active X version to determine the column positions we used order property of the grid (very handy).

    But, in the winforms edition I could not find the Order property or property that provide similar functionality.

    Is there a way to achieve same functional equivalence as Order property from Active X version in the winforms edition ?

    Any suggestion will be helpful.

    Thanks

    Kshitiz

  • Posted 13 June 2019, 6:38 am EST

    Hi Kshitiz,

    You can use the IndexOf method of DisplayColumns:

    var column = c1TrueDBGrid1.Columns["ColName"];
    int displayIndex = c1TrueDBGrid1.Splits[0].DisplayColumns.IndexOf(column);
    

    See attached sample for complete example.

    ColumnPosition.zip

    Regards,

    Jitender

Need extra support?

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

Learn More

Forum Channels