Hello everyone. Could you please help me with example VI's on the use of the Datagrid Qcontrol? Thanks to Qcontrols I was able to customize different controls, but I have not been able to modify a Multicolumn Listbox to convert it to DataGrid. I already have the "DataGrid Configuration" installed through the VI Package Manager, but I don't know if I need to do anything else, because even though I right-click the MCLB and access the dialog to configure the DataGrid, at The MCLB remains unchanged at the end. In the Datagrid Configuration project I see various files and methods but still don't understand how to apply them. Please, if you can help me with an example or instructions, I would really appreciate it.
I am glad you have found QControls useful. Hopefully, I can answer your questions. First, the DataGrid QControl is a little different than other QControls I have created because of the configuration extension, which you already mentioned. This is for the Right-click menus and that Configuration dialog.
There really isn't much else you would need to interact with other than the Constructor (New DataGrid.vi) and the Destructor (Close DataGrid.vi). There are properties that are accessible through a Property Node as with a regular MCLB. The DataGrid has added properties for setting Even and Odd row colors and making a row non-editable. It has overridden the MCLB built-in properties of Column Header Row (which is set in the Configuration dialog) and Item Names (which automatically sets new rows with the row color).
There should be a Test DataGrid.vi that comes in the distribution that you can experiment with. However, it is just the constructor and destructor with a loop. I did a presentation on several QControls, including the DataGrid QControl, at last year's Americas CLA Summit. You can get to the presentation on LabVIEWWiki.org here:
Hope this all helps.
Hi Quentin, thanks for replying. Initially, I only had the Datagrid configuration and the QControl Toolkit installed, so I didn't know where the constructor "New Datagrid.vi" and the destructor "Close Datagrid.vi" were located. After researching and downloading the "Datagrid-Master" file, I found the Datagrid project with the mentioned VIs. Now I have a problem: when I want to perform a simple test of a loop with the constructor-destructor, I get an error indicating that the SubVi are not executable. I opened the Event Handler of the project and when entering by SubVI to find where the error was, at the end in many of its subVi they indicated that the property items are broken. What is causing this problem or where am I missing? I attach some screen prints. Thanks for your attention.
Hello again. I have managed to fix the problem of the errors that the DataGrid subVIs presented me. I had to go through each SubVI and replace the controls that were connected to the pane, I simply put others of the same type and with the same name, and by changing several of them and saving the project the DataGrid worked. I really don't know the reason but I expose my solution in case someone happens the same.
Outside of that, it seems to me that there is a small bug when the DataGrid is in path mode, since at times after double-clicking on the cell, the path control is displayed and stay exposed in the screen above all, even when I close the VI or change to other program, the only solution to clear it from the screen has been to restart LabVIEW completely. It's not always, it is only at times. I attach a screen print.
i have tried building the Datagrid QControl for runtime use, but when i start it i get an error
i have also attached the Error log from the execution
thanks in advance.
i got this from Quentin:
The problem lies in the way the data type classes are loaded. Because they are dynamically loaded they are not automatically included when built into an executable. If they aren't in the executable then it doesn't know how to read the configuration data for your data grid.
I am still working on a more elegant way to ensure they are loaded, (so if you have any suggestions let me know), but one way is to edit the Generic Data Type.lvclass:Load Data Types.vi and place a class constant for each data type on the block diagram. If you created any of your own, make sure yours are there too. This will ensure that they are in memory when the configuration data is read.
I hope this helps. I tested it and it works for me.
Thanks for the Help Q!
I am having trouble getting the DataGrid QControl running.
1. Installed The QControl Toolkit on the LabVIEW Tools Network
2. I installed MGI Panel Manager using VIPM.
3. I installed the DataGrid Configuration Plugin.
4. I downloaded the DataGrid source:
5. I opened the DataGrid.lvproj/Test Data Grid.vi and ran, but it didn't do anything
6. Then I saw that I needed to configure it using right click of the multicolumn listbox to Open DataGrid Config. I configured the DataGrid
7. I saw in this thread that I need to add New DataGrid.vi and CloseDataGrid.vi.
8. When I run the Test Data Grid.vi, I get an error and it's not clear to me how I resolve this. The error says that the Write Item Names.vi in the Data Grid does not match the other VIs in the method, but when I look at the ancestor Generic.lvclass, it doesn't appear to have a Write Item Names.vi.
It's obvious Q has put a great deal effort into this, so I keep thinking I must be missing something because the code is broken and I am having a tough time finding a tutorial or guide to get me started.
It has been a while but I think there was a small bug in the Write Item Names.vi in the Multicolumn Listbox class. It should be fixed in the latest version of the QControl Toolkit. The latest version might not be available through the NI Tools Network because I chose to publish it on JKI's VIPM Community repo, available here:
As of June 2021 the most recent version is 18.104.22.168.
Hope this helps.