04-30-2012 03:23 PM
I have an xcontrol that has a table. When the headers are updated, I wan't to store the tables "header strings" property as a property of my xcontrol. But, I am not sure how to handle this because there is no "header change" event and headers are not included when firing a "value change" event. I suppose I could get a reference to the table in the xcontrol itself and store it as a property of my xcontrol to access externally, but that seems a bit of a crummy way to do it because now if I reuse the xcontrol the funcitonality has to be reimplemented. Suggestions?
05-02-2012 06:42 AM
Hi for(imstuck),
The best potential workaround I've been able to come up with after several hours of mucking around with XControl tables and properties is to use the VIref within the XControl's event structure to read the table header string properties whenever the table value change event is fired and pass these strings to a read/write XControl property. This is less-than-ideal, as the user still has to edit the table values before the control looks at the headers, but it seems to work.
Would you be able to provide XControl you are using for me to look at? I may be able to offer a better suggestion if I can see exactly how the events are being handled currently.
05-02-2012 11:52 AM
Tom, unfortunately I cannot post it. And you're right, if the user doesn't modify the table, only changes the header string, the change won't ever be registered in the xontrol. I'll just handle it externally for now, and change it if any solution comes up down the road. The reason we have to use headers, and not just put the names in column 0 is because we want the user to scroll, but the names still to be visible. Thanks for the suggestion.