Most of this answer is implied, because it is not directly shown or stated. Also my answer is drawn from the manga, because I haven't watched the anime.
My impression is Doi is a bit of a jock and was a bit of a bully when they were younger. The incident long ago was that he read out a shared diary of Shuichi and Yoshino Takatsuki, detailing their cross-dressing experiences, out loud to everyone present.
In the manga Vol 8 quoted from the wiki:
Shuichi and his friends start their second year as junior high students, but everyone is split up between several classes. Anna tells Shuichi that he is an interesting person, even though he likes dressing like a girl. Shinpei Doi, Shuichi's classmate, sees him coming out of a restaurant with Yuki and his opinion of Shuichi changes; Doi wants to finally become friends with him. Anna and Shuichi, dressed as a girl, go out on a date, and run into Yoshino and Saori in a restaurant. The four go to a karaoke bar and have fun, though not without some tension between Saori and Anna. Yoshino decides to go to school in a boys uniform, and garners some attention from the teachers and other students. Doi contacts Shuichi, saying he wants to meet Yuki, so Shuichi goes with Yoshino and Doi to Yuki's place, who introduces herself as a transvestite living with another man (Shiina). Doi is surprised about Yuki, and even gets Shuichi to dress up like a girl in front of him. Doi suggests to Shuichi that he come to school dressed as a girl, since even Yoshino is dressing like a boy now. Shuichi thinks about this deeply, and even consults Chizuru and Yoshino about it. In the end, Shuichi knows he has to be the one to decide, and he comes to school wearing a wig and the old female school uniform Yoshino gave him. Everyone is surprised about this turn of events, and Shuichi is soon taken home early by his mother.
At first Doi is interested to befriend Shuichi only as a bridge to Yuki, whom eventually stops him short from confessing by way of introducing her boyfriend and thus he only states that she is "very pretty" upon meeting her. The fact that Yuki used to be a guy is a shock to him, "I never knew a guy could be such a beauty. I don't get it at all." Then, Doi turns and, clearly showing Shiuchi in this panel and muses "I wonder if he's like that too."
Already knowing that Shuichi used to cross-dress (he is unsure that he still does), Doi asks him upfront and Shuichi confirms this, leading Doi to ponder and this is clearly stated in the manga. And then he encourages Shuichi to turn up at school dressed as a girl. Shuichi eventually does so and the incident passes. Doi scoffs at Shuichi upon meeting him when Shuichi finally returns to school (in front of others, I guess to preserve his image) that he was a "stupid".
However, Doi persues Shuichi after school to encourage him at several points to cross-dress, saying that he looks cute when he does. This hot-cold attitude confuses Shuichi and makes him lash out at Doi resulting in the scene you describe.
My read is that Doi himself is confused, but wants to see more of Shuichi as a girl, for his own reasons. Perhaps he wants to better know how he feels, or perhaps he is really quite interested, but this was never explored. Him "kicking the fence" (or some cans near a drink machine in the manga), is just frustration after trying hard to convince Shuichi to do it again, just not at school.
The frustration could be a whole range of things, such as the possibility that Shuichi doesn't trust him anymore after what happened, to simply wanting to try out that relationship (and Shuichi saying he hated him makes that relationship seem hard to achieve). Again this was not fully explored.
However, we can tell Doi is interested at looking at Shuichi dress up as a girl, perhaps hoping Shuichi grows up to be a Yuki one day.