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.


×
×
  • Create New...

Important Information

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