Custom Repeater doesn't fire ItemCommand on Some Items

172 Views Asked by At

I've created a custom repeater control with two seperate ItemTemplates. The first Template is to display Featured Items, and the second to display unfeatured items so that they can be chosen as featured items. The featured template also renders empty 'slots' that the items chosen as featured can be added to.

The problem I'm having is that buttons in the Featured Template fire off a repeater command event no problem, however the ones in the normal item template don't fire the event at all, but do post back causing the normal item template to render blank, but the items in the featured item template still render normally.

1

There are 1 best solutions below

0
On BEST ANSWER

The issue was due to the fact that I wasn't using a dummy data source for round trips. I was performing the same databinding even when there was no data to bind to. The reason it worked for the featured listings was due to the fact that there are empty solts that will get rendered even if there is no data for them. So basically I needed to loop through the items again and render them without databinding after a postback.