Ironically, one of the things that makes learning English tense challenging is the fact we have fairly few forms. Also, the question "is this grammatical" is tough to answer for short utterances without context, as we can almost always come up with some scenario when a native speaker might say it and be understood by other native speakers without anyone noticing anything out of place. A better question is "Does this mean what I think it means" and "Is this what native speakers would say."
So with that in mind, let me actually answer the question you asked!
These two sentences are very similar, so it is not surprising that you would be confused. There is a subtle technical distinction, but the more important distinction is a difference in meaning, which I'll get to.
Is This Grammatical
"I'm sure that would happen"
Grammatically this is fine by itself. I would take it to mean someone has asked you what would happen given some specific circumstances, e.g.:
a. "If I ran naked down the street, would someone call the authorities?"
b. "I'm sure that would happen."
"I'm sure that will happen"
Again, grammatically this is fine by itself. To me the most obvious context would be someone is asking you about your prediction of future events. E.g.:
a. "If I run naked down the street, will I be arrested?"
b. "I'm sure that will happen."
Which Should I Use?
or, "What's the difference?"
I intentionally chose two examples that are very close together to make a point about agreement, not so much between verbs but between speakers: in the first example, person A says "If I RAN down the street". That "ran" is expressing a hypothetical circumstance (I believe it's technically known as "conditional II" because it's using a past tense verb to indicate something counterfactual). So it is only natural that person B would reply treating it as a hypothetical circumstance, too. Person A didn't say he was going to do it, he just wondered what would happen if he did.
In the second example, person A says "If I RUN down the street". This could still be hypothetical; in fact it probably is, since people don't usually run naked down the street. But because it's being phrased as an action that the person is actually contemplating, it seems a little more natural for person B to respond with "will". But note: "I'm sure that would happen" would also be a perfectly appropriate response.
In all the examples I used, everyone is still talking about things that haven't happened. By definition, then, these are "imagined events or situations" like it says in your grammar book. The difference is really based on how definite or how likely the imagined events seem to the speakers. Someone who says "I will" is implying that their imagined event is going to become reality, in a way that someone who says "I would" is not.
If you have a more detailed context, we can probably give you more definite advice to distinguish between the two.
For further reading, please see https://en.wikipedia.org/wiki/English_conditional_sentences which discusses a LOT of different possible uses of conditional in English (with sentence patterns).