Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7949311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:57:39+00:00 2026-06-04T01:57:39+00:00

We have a custom Listview Treegrid in c++ project built on the Codeproject TreeGrid

  • 0

We have a custom Listview Treegrid in c++ project built on the Codeproject TreeGrid example from here. The code has been modified quite extensively over time.

I have a requirement to port the c++ project to C# Winforms. I’m thinking of creating a c++ dll for the Listview grid and interoperate with it in Winforms.

Am I asking for for trouble using an unmanaged Listview control in Winforms? Should I just port/rewrite the listview in Winforms? (A task I do not look forward too)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:57:40+00:00Added an answer on June 4, 2026 at 1:57 am

    If I were you, I would prefer rewriting the Listview in C# or looking for a free or paid Grid that was written in C# and is meant to be used in Winforms.

    Don’t forget that you will have to support the code after you do this job,
    this probably includes fixing bugs and adding features.
    It’s better to know exactly how your code works and how to debug it.
    You also gives you a chance to write a Listview that is better suited for your needs.

    This will be quite difficult if you’ll use this C++ Listview and use it in Winforms.
    But if you decide using it, there are two options that I can think of:

    1. Creating a wrapper for the Listview in C++/CLI that will hold the object and show the data in C#, this means that you will have to write a lot of conversion code to move the data from the Listview to the C# objects, but it should work.

    2. Using DllImport and working with the ListView as a datasource, I’m not really sure how exactly you will be able to get all the data from it, but it prevents you from writing the ugly CLI code…

    So to wrap it up, I recommend using a single language for UI code, and my language of choice for UI is C#, not C++.

    Good luck…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have this example: http://techdroid.kbeanie.com/2009/07/custom-listview-for-android.html with source code available here: http://code.google.com/p/myandroidwidgets/source/browse/trunk/Phonebook/src/com/abeanie/ How can
I have a ListView which contains custom rows. This custom row has following UI
I have a custom ListView, the code is below. Instead of writing: http://yoursite.com/image1.png ,
I have a Custom ListView created from XML Layout. I want to bind that
I have a custom listview row whose XML has one ImageView and three TextViews
I have a custom control that is derived from ListView . This list view
I have a custom ListView class (subclassed from ListView) and I need it to
I have a custom adapter for ListView and I need to return LinearLayout from
I have a Custom ListView in my application and it has some TextView s
i have a custom ListView control and Custom ListViewItem that has a tri-state checkbox,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.