LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help about Datagrid Qcontrol

Highlighted

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.

 

datagrdconf.PNG

Message 1 of 6
(296 Views)
Highlighted

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:

 

Encapsulating and Reusing your UI Code by Quentin "Q" Alldredge 

 

Also on LabVIEWWiki.org, there is more on QControls, here, and on NI's community pages there is a QControl Enthusiasts page that can be found here.

 

Hope this all helps.

Quentin "Q" Alldredge

Owner, Q Software Innovations, LLC (QSI) | Director, GCentral | Admin, LabVIEW Wiki
Tech Lead, Hill AFB LabVIEW Center of Excellence | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner


Message 2 of 6
(260 Views)
Highlighted

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.

 

test1.PNG

test2.PNG

  

Message 3 of 6
(208 Views)
Highlighted

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.

 

Bug.PNG

0 Kudos
Message 4 of 6
(173 Views)
Highlighted

Hi all,

i have tried building the Datagrid QControl for runtime use, but when i start it i get an error

NI Error.png

 

i have also attached the Error log from the execution

 

thanks in advance.

 

/Marck

Marck Holm Hansen
Tech Lead at GPower | LabVIEW Architect | TestStand Architect | Bachelor of Electrical Engineering | Admin, LabVIEW.dk

0 Kudos
Message 5 of 6
(127 Views)
Highlighted

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!

 

Marck Holm Hansen
Tech Lead at GPower | LabVIEW Architect | TestStand Architect | Bachelor of Electrical Engineering | Admin, LabVIEW.dk

0 Kudos
Message 6 of 6
(68 Views)