Hi Karthikeya,
Tried using the label. Got the same problem. However, I found that there was another reason. In my UI I merged two tabs. Thus, after I made a change on UI, the 1st time pressing the Cancel key did not change UI, except that the controls merged from another hidden tab were gone. As the second time, if I press my Cancel button it worked.
I don't know why tab merging had that problem. Anyway, for this issue, I close it, and set your answer as Correct. Thx.
Br,
Dong