05-07-2013 11:14 PM
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
05-08-2013 04:52 PM
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,
05-09-2013 10:56 AM
I tore apart what I had to see if I could find a fix. Let me get it back together. Might be next Tuesday.
05-17-2013 09:41 AM
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....
I got this error:
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.
05-17-2013 09:46 AM
PS. The output looks like this:
So I know the cell is still a text box cell and has not been overriden to an image cell.
05-19-2013 10:30 PM
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.
The column coding to add the cell to the custom column.
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.
05-20-2013 02:38 PM
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,
05-20-2013 05:30 PM
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