Nevermind my last post.
It is passing the parameter that I need into the page_init event now

.
I tried to apply the solution but for some reason it only added 4 columns when it should have added a lot more.
I had suspicions about why but in my attempt to fix this, I've managed to break the whole thing.
I'll come back and update when I've got something useful to add.