LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to create a custom datagridview column containing text images and MS Word OLE objects

I am an old time LabView programmer going back to 2.0.  But moved on with my career several years ago.  But here I am back attempting a custom column in dataviewgrid control.  .NET is hard.  My goal is to read in an MS Word document and parse it out to a custom column.  The column will contain regular old text, images and MS Word objects, sometimes called OLE objects.

 

There is scant information on creating .NET and labview when it comes to form manipulation.  I have stuggled through the learning curve and now able to insert a text box column into a datagridview and add it to the form container and actually size it to the datagridview control.  I've added a menu, but still figuring out the layout class.  Did I say .NET is hard?

 

I know there must be a custom column created and even found a C# example, sorta.  Trouble is the example uses easy stuff like override and private.  It will take me another 3 weeks for that, darnit I'm getting lazy.

 

Does anybody out there have some example of a custom column in the datagridview?

 

If you ask to post code.  I have nothing I would be proud to show.

 

The sorta go by: http://www.codeproject.com/Articles/31823/RichTextBox-Cell-in-a-DataGridView

0 Kudos
Message 1 of 8
(3,625 Views)

Hi quegley,

 

Would it be possible for you to post what you've developed so far? Seeing what you've already got set up would make it easier to help you figure out where to go from there. 

I can't find any LabVIEW examples that already cover this functionality, but if you can show me what you have at this point I can look into it further for you.

 

Thank you,

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,592 Views)

I tore apart what I had to see if I could find a fix.  Let me get it back together.  Might be next Tuesday.

0 Kudos
Message 3 of 8
(3,580 Views)

Since that post some construction has changed.  I've tried quite a few approaches.  I believe I will have to create a custom column.  I'm not quite sure how to do that, but I'm going to find out.  I tried out this constructions....

 

image to textbox.jpg

 

I got this error:

 

error 5 17 13.jpg

 

So several questions popped into my head.  1) I need a custom column to accomodate the image cell.  2) I don't know how to override a construct in LabView so you can create a custom column.  Much like this: http://msdn.microsoft.com/en-us/library/7tas5c80.aspx

 

Any pointers would help.

0 Kudos
Message 4 of 8
(3,558 Views)

PS.  The output looks like this: ouput 5 17 13.jpg

 

So I know the cell is still a text box cell and has not been overriden to an image cell.

0 Kudos
Message 5 of 8
(3,555 Views)

This is what the progress looks like so far.  I broke the tasks down in sub VIs.  One to create a custom cell so I can add it to the column CellTemplate.  The other to add the column to the control.  My limited knowledge of .NET and the implementation in LV causes me to question the value of LV .NET.

 

The coding to create a TextBoxCell override with ImageCell CellTemplate.  Honestly I'm guessing what to do, because the LV documentation on inheritance and overriding is poor at best.

 

buildCustomCell.jpg

The column coding to add the cell to the custom column.

 

override textbox cell.jpg

 

Probe 19 always comes up with an error.  The error is the standard 1172 with no clue what is causing it.  The "index" will work on 0 or 1, I suspect bc the two cell types are 0 and 1 but nothing tells me that, just guessing.

0 Kudos
Message 6 of 8
(3,539 Views)

Hi quegley,

 

Would it be possible for you to post your VI? I would like to try running the VI on my own system and see if I get the same results as you.

 

Does error 1172 have any further explanation or text associated with it? Please attach a screenshot of the full error. Could you describe what you mean by the "index" working on 0 or 1? Does it work for certain cells, or for certain cell types?

 

Thank you,

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(3,522 Views)

I really can't just because I work for a defense contractor, I don't want to get into any trouble.  I sent it to Cameron Thevinin at NI, we have a support contract.

 

Cameron Thevenin
Applications Engineer
National Instruments

 

Reference#7381937

 

0 Kudos
Message 8 of 8
(3,513 Views)