Thanks Sam, yes it has lots of good potential. Speed is something I haven't even really looked at much, except for loading data in. This has already increased a lot by loading data into a datatable, and then binding it once for display. The resizing that is setup by default will affect the speed a lot as its currently set to resize all columns, but it gets WAY faster if you limit the auto sizing to a subset of that. This is true in C# as well, so the same performance improvement can come as a result. Resizing in LabVIEW is always CPU intensive with panes that size as you drag, that can always be turned off, but doesn't look as good.
I like the idea of saving the column layout automatically, that could be handy to save/restore for sure.
Well, did some more work on this tonight and got more data types working, some speed by binding data is ready and refactored all the code to start general cleanup for easier implementation.
I'm very pleased to get this binding with new datatypes working!!
This GridView has ring selectors, Boolean buttoons, checks, images, timestamp, numerics and string support. Check it out.
Once again, the github repo is all updated and you can read more and download it here: https://github.com/unipsycho/LabVIEWdotNetDataGrid
Currently, its all LabVIEW 2014.
Let me know of any feedback or ideas, or if you would like ot contribute to adding features.
Things / Ideas to think about next are:
For those interested in this tool, it is now available through the tools network in VIPM. Makes it easier to grab the examples and palettes into LabVIEW, if you are not comfortable with doing it yourself from github. Enjoy!
Just for info, the Next Gen Preview has a datagrid object which may address some of the original requests. I haven't checked it yet.
Hello Mike King,
your dot net solution is up to yet the best I have seen datagrid for LV.
Now I want to to a few things more like:
- to hide/display column groups, e.g. you have a lot of column
My workaround: changing the filling values, I tried it with the DefineDataTableColumns.vi after the dataTable was created, but it says that the Columns already exists...
- set a fix column view, e.g. fix column one like in excel
(-copy/paste values ctrl+c/v)
I hope you can help me to enable this.
Sorry, I didn't see your message right away. You can easily do column freeze already with the toolkit, it's a ready to use property.
Just setup your columns, then set the column to freeze with the properly on the datagrid class.
As for the columns visible. Easy to do with a datagrid column property. I've added a simple method to the class (redownload head revision from the github project). It lets you show / hide multiple columns at once.
The new method is called, "Column Visibility.vi" and easy to do exactly what you want with it. Just put an event and the columns to change visibility with, again after the columns are setup.
great! I implemented it an it works.
But how can I defroze it?
Another detail I saw is when I delete a row with the del key then I get the event "User added Row".
When I disable "AllowUserToDeleteRows" then I still can delted a row with the del key.
Last but not least: how I can add a row, is there a key combination?
Thank you very much!!!
Look at the property that I used, you will need to turn it off. To unfreeze a column programmatically
Set the DataGridViewColumn.Frozen property to false.
this.dataGridView1.Columns["AddToCartButton"].Frozen = false;
thanks for the answer.
And can you explain me why I still can delete a row with the del key when I disabled "AllowUserToDeleteRows"?
And how I can add a row, is there a key combination?