Things working fine now but its bit confusing means there should be a design time property which does this task.
And even those part of code executed every time though its property was set to false when the page was loaded first time, I mean to say its already false and that itemdatabound is setting the same value again when I click any button !