TemplateField ItemTemplate only showing after postback

87 Views Asked by At

I'm creating a GridView dynamically in the code behind for a variable row/columns GirdView. Each cell contains 1 or 2 DropDownLists. I have verified that all the code is being hit as expected, however on the initial page load none of the DropDownLists appear. They only appear after I make adjustments in other controls causing a postback, and then all DropDownLists appear as expected.

Any suggestions as to where my issue could be?

1

There are 1 best solutions below

0
KnightsOfTheRoun On BEST ANSWER

I realized that my gridview manipulation was only happening during initial load, and specific events, not all post backs.

I added the gridview manipulation to all loads and it works.