Hello,
Welcome to Microsoft Q&A!
Frist of all, the Windows Community Toolkit is based on C# but is not a Windows Runtime Component, so it's not directly consumable in C++ applications. A possible way to use the DataGrid is to create a C# based project in your solutions, consume that from your C++ app, and then consume the Toolkit via that. Here is the official sample from the Community Toolkit- C# Island in C++/WinRT Sample. And more information about this here: Blank App (WinRT/C++) Can't add nuget package Microsoft.Toolkit.Uwp.UI.Controls · Issue #3704 · CommunityToolkit/WindowsCommunityToolkit · GitHub.
If you are do not want to use that way, I have to say that you will need to implement a DataGrid on your own in your project just like @michael-hawker said in the Github issue. You could refer to the source code of the DataGrid here: DataGrid-Github.
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.