Jump to content
Mike King

Full DataGridView for LabVIEW - OPEN SOURCE project underway

Recommended Posts

Have you considered making it an XControl so it is a drop in replacement?

I haven't because I've really always hated XControls for there bugginess, troubleshooting difficultly and the fact that most people don't or can't develop them well.  I've always hit performance problems with them as well when handling large data and I think the instancing of .NET controls may just add to that in an XControl.   I'm not saying its not possible or even a good idea, just that I don't care to do it myself.  You could certainly contribute that though if you're better in XControls than I am.

 

 

Great work, I realy love it.

Thanks, please add any ideas or thoughts if you test it out more closely then.

  • Like 1

Share this post


Link to post
Share on other sites

I tried to add a DatePicker for a Date/Timestamp column, but that was a bit harder. It looks you have to make a child class to the Cell-Class to customize it. It is possible but then you have to have an extra dll to needs to be handled.

Share this post


Link to post
Share on other sites

MikaelH, 

 

Yes the date column sets up a date value type right now, but no date picker.  The picker can be done as you say, its a lot more involved though handling custom cell or column templates since there is much more event integration to handle the class differences. Date validation would be nice to add first I think, but certainly the date picker would be the best. Read more here:

https://msdn.microsoft.com/en-us/library/7tas5c80.aspx

Share this post


Link to post
Share on other sites

Very cool, I saw your effort on the NI side and was hoping to see more refinement.  I hate XControls too, but when there is lots of polish, the can make the use of them so much nicer.  I still think this is too early to be thinking about them, but in the future, when this is somewhat feature complete, I'd recommend trying to shove it into an XControl, and make it easy to use.

Share this post


Link to post
Share on other sites

Whoops, sorry about that denis, Thanks for noting that problem. The SubVI was in fact there in the subVI folder but I got it cross linked into another project.  Should be fixed now and committed.

  • Like 1

Share this post


Link to post
Share on other sites

I have recently installed your library and I think it is really a great job to be integrated in my projects.
Fortunately you have covered a major gap in the data representation of LabVIEW.

When I'll start working on, I will send my feedback.

Share this post


Link to post
Share on other sites

Hi Mike,

One question, The CellClicked Event gives me the Row and Column index, but after sorting the data, how do I get the Data of the cell?
The DataGridView:Get DataArray.vi, gets me the unsorted order, so Unless I track the sorting my self I'm not sure how to get an sorted grid's cell value based on the CellClicked event.

I'm sure there must be a way to do this.

Share this post


Link to post
Share on other sites
On 4/4/2017 at 6:47 PM, MikaelH said:

Hi Mike,

One question, The CellClicked Event gives me the Row and Column index, but after sorting the data, how do I get the Data of the cell?
The DataGridView:Get DataArray.vi, gets me the unsorted order, so Unless I track the sorting my self I'm not sure how to get an sorted grid's cell value based on the CellClicked event.

I'm sure there must be a way to do this.

Instead of reading Data table, read Data grid view cell collection (see the attached). That will give you the sorted data. The only thing is that we don;t get sorted indices, so make an invisible column with incremental numbers - append it to your data. After sorting the table, the invisible column should give you the sorted indices. If there is any better way you have found out, let us know.

 

Untitled.png

Share this post


Link to post
Share on other sites

Very nice Mike, I am going to make use of this, it looks so much better than anything you could possibly do with arrays of clusters. Is there a way to prevent a column from being edited by the user?

Edited by MarkCG

Share this post


Link to post
Share on other sites

DataGridView.lvclass:Set Cell Enabled State.vi . You have to iterate over the cells to disable the columns you want. Now as far as setting individual cell values programmatically without restarting / redrawing the whole table, does anyone have an idea? Nothing seem obvious

Share this post


Link to post
Share on other sites

Hi Mike,

Do you happen to have an example that updates more quickly? I read that you can bind the data last, but I tried this and I still see some performance issues when loading large amounts of data ~10,000 rows. Even when the data is loaded, scrolling seems to be laggy.

Also by any change is there a way to have an embedded progress bar (with multiple colors) as a column type?

Regards,

Mike C

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By OGK.nz
      Since stumbling across the  G Package Manager (GPM) while looking through this discussion on package managing I can't shake the idea that is is precisely the system that I would like to implement throughout the rest of the developers in my team for working on LabVIEW projects across multiple sites and with parallel upgrades to code to handle ongoing facility updates.
      However as I am sure is the case with many companies, we need to maintain our data locally for corporate reasons. There was a reference to being able to have a local repository in the initial NI Week presentation by Derek but since then I have not seen any other reference to it and there is limited information available about the processes. Has anyone got any experience with the operation of GPM for internal use, or even any use with GPM in general? From looking through the Lava and NI forums, doesn't seem like many people have picked it up or at least haven't posted anything about their experiences with it.
    • By Benoit
      Manufacturing a satellite or a simple pen require to test the quality of the product before delivery to the customer.
      LabVIEW is widely used for that purpose. Since 20 years of LabVIEW development I saw numerous test framework. I was wondering if people where interested to work in a collective and open source test framework.
      Per example the following feature can be included:
      HAL (hardware abstraction layer)
      Database to record test results with the data viewer (PostgreSQL)
      single/asynchronous/batch/debug mode
      multi-language support
      Image analysis (open CV) + bar code reader
      User access level
      Remote monitoring
      Jig identification to prevent user error (testing the wrong product with the wrong jig/test sequence)
      HTML/xml/txt report
      and so on....
      Benoit
    • By Rolf Kalbermatter
      It's nothing to fancy. I added a few things to the UI to support more features and in preparation of adding the VI renamining/relinking step that was done seperately in the OpenG DEAB tool before calling the OpenG package builder. But I never got around to really add the deab part into the package builder. It's kind of extra difficult as the DEAB compononent doesn't currently support newer features like lvclass and lvlib at all and of course no mallable VIs etc.
      I can post what I have somewhere, but don't get to excited.
    • By John Lokanis
      One of the main topics of the 2018 CLA Summit was the need to improve access to open source code in the LabVIEW community.  This is something that I have tried to do in the past with limited success.  After hearing what others are doing and discussing the issues, I am inspired to take on the task of getting as much of my code that is shareable out into the open for others to use, improve, learn from and critique.  So, the point of this thread is to figure out how best to do that.
      I have tried posting code to forums in the past.  I have even posted to the code repository here on LAVA.  I have used code posted here and via the tools network and VIPM in my own projects.  But I am not sure if any of those avenues are the right path forward for me.  There was much discussion about different open source repositories on the interwebs that we could leverage.  There was also some discussion about how to help others discover the code you shared.  What I did not hear was any definitive conclusions on how best to do this.
      So, the point of this thread is to try to solicit feedback on code sharing and come to some sort of consensus on the best options out there.  If you have an opinion on this please join the conversation and share what you think is the best solution.   Here are some questions I am trying to answer:
      1. Where should we share code?  What system works best for LabVIEW code and is user friendly enough to not discourage people from using it?  Please share links and how-to documents for your preferred site/system.
      2. How should we license code?  I heard some discussion about the various type of licenses.  I am not interested in retaining any rights to code I share and do not want to put any burdens on those who want to use and learn from any code I share.  What licence is accepted in the open source community that supports this kind of sharing?
      3. Once we post, how do we make our code discoverable?  Do we need to post links all over the place or is there a better way?  Here is one attempt at making that better you should check out if you have not already: 
       
      I am not just interested in putting the code out there, but also trying to explain why I think it is worth your time to take a look.  I am willing to post on forums, create a blog, even produce some vlogs on YouTube if it is the best option.   Please let me know what format would motivate you to take the time to learn about the open source code out there.
      Either way, thanks for taking the time to read this thread and contribute what you can, even if it is just to follow the discussion and learn from others like I am trying to do.
      -John
    • By rb767
      Hello everyone,
      I have a question regarding re-writing values in a table.
      I have a table (attached as png). I have to save and read the values from this table and main point re-write.
      I have been able to save and read but whenever i try to re-write a value or give in a new value in the table, it turns all the other values to zero and only the new value(s) is then shown. Do you know how i can avoid that?
      And one more thing i have used .ini to save the values. Is there any easier way to do so?
      Thank you
       

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.