LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net DataGrid Binding in LabVIEW

I'm wondering if anyone has successfully used a .net datagrid or gridview in LabVIEW .NET container. I can place the control fine, put data into a dataset, but binding it and showing the data never works. I'm familiar with this in c# and its very easy, but I can't seem to get it working in LabVIEW. Using 8.2. Any one have a simple example they can show? There is one at LAVA but that person also couldn't get it to work. http://forums.lavag.org/index.php?showtopic=5065&hl=datagrid
0 Kudos
Message 1 of 8
(8,219 Views)

Hello Mike King,

I'm really having some trouble finding any information on this topic - but I was able to find another DF thread discussing the issue.  Have you take a look at it?

Have a great weekend!

Janell R

0 Kudos
Message 2 of 8
(8,199 Views)
Thanks for the link. This is nice to see apiece of code, I am doing exactly that from the other person's example and comparing that to the NI example, they are all the same except that it seems the databinding into the .NET container doesn't work. I'd like to see NI provide a sample for this since the .net controls in popup forms really defeat the purpose of integrating anything .net in LabVIEW. I may as well use c# then for that component in the first place, which I don't want to do since I need it integrated into a LabVIEW system.

Thanks for the help, hopefully someone else may have done this also?
0 Kudos
Message 3 of 8
(8,191 Views)

Hello Mike,

After some additional research this morning, I found that this was reported to R&D (# 445I3UKZ) for further investigation. You can use the DataGridView .NET container, as long as it is unbound but it will not work if you bind it to a datatable.  R&D has already begun working on this issue.

Thank you for the feedback!

Janell R | Applications Engineer

0 Kudos
Message 4 of 8
(8,169 Views)
Thanks janel, you saved me from submitting my own service request then since they are already looking at it.
0 Kudos
Message 5 of 8
(8,161 Views)
A Work Around thia not to Hard.
And Should Work For any Usage. 
0 Kudos
Message 6 of 8
(7,782 Views)

The trick is that LabVIEW Form doesn't have default BindingContext as Visual Studio WinForms has.

So, Don't use properties: DataSource and DataMemeber.

1. Create a BindingContext, and Hook the BindingContext with DataGridView's BindingContext;

2. Use DataBindings.Add to set data binding.

The Problem is that, Chinese input in DataGridView can't be displayed well. I hope somebody can provide a solution for Chinese input in DataGridView hosted in LabVIEW.

Attached is the code and interface.

zhongsj@smm.neu.edu.cn

 

 

 



帖子被钟在08-01-2008 03:46 AM时编辑过了
Download All
0 Kudos
Message 7 of 8
(7,466 Views)
Please do not ask the same exact question on three different threads. Same question here.
0 Kudos
Message 8 of 8
(7,443 Views)