Page 1 of 1

LayoutControl Handler Won't Run

Posted: Thu May 30, 2013 5:41 pm
by Gage
Hello,

I am working on a DataGrid Form, and for some reason, when I set the dgData, the FillInData handler runs only once, and the LayoutControl handler does not run at all.

No errors are thrown, and I have proofed the code many times. Since everything with DG's happens behind the scenes, I'm not really sure where it's going wrong. Anyone know of any reason that the LayouControl handler would refuse to run?

I can include code, but was hoping there may be a general reason or way I could troubleshoot it somehow.

Thanks,
Phil E.

Re: LayoutControl Handler Won't Run

Posted: Thu May 30, 2013 6:40 pm
by Gage
On further testing, I have found that if I comment out a switch statement I had been using in the FillInData handler, the DataGrid lays itself out correctly. After un-commenting the switch statement, it stops again.

The switch code itself appears to be OK, but is there some reason that executing a switch in the FillInData handler would cause the code to stop executing?

Here is the switch statement of interest. It takes the header value, which is populated from pDataArray, and sets the visibility of a group in the row template based on it.

switch tTitle
case "Name"
case "Phone Number"
case "Email Address"
case "Fish/Personality Type"
case "Sort List"
set the vis of grp "Expand Field" of me to true
set the text of btn "Expand Button" of me to "+"
break
default
set the vis of grp "Expand Field" of me to false
end switch


Insight much appreciated!
Phil E.

Re: LayoutControl Handler Won't Run

Posted: Thu May 30, 2013 7:24 pm
by Gage
Please disregard. I was setting the text to a button that no longer exists.

Silly mistake. The lesson: debug better before posting on the forums. Have a nice day.

Phil E.