Is there an easy way to set the column widths and have the widths save? I am not opposed to doing it in a script. For example, giving the template an array of numbers as a custom property then setting the column widths on the Initialize method?
once you create the custom method you have to call it for it to run. I’ve used this by calling the custom method from another component, but you can call it from the same component it’s in.
in the ColumnWidth function put something like
Thank you for your response.
I’m still having some trouble, will you take a look at what I have and see if anything stands out to you. What about the “Parameters” box?
I don’t see any issue here. The parameters box is if you want to pass a variable into the function. This function does not need a parameter passed into it to accomplish the set column width.
So if you wanted to make sure the column width is always correct you could apply this script to the propertyChange event.
if event.propertyName == 'data':
event.source.ColumnWidth()
Lets say you use a custom method later on that you want to pass a value of a calculation into the custom method to do an error check or something you would do this from where ever you are performing the calculation
event.source.customMethod(calculation result)
This call passes the calculation result as a parameter into the custom method for validation. A custom method without a parameter is called with the parenthesis empty.