In a tabbar or buttonbar when I am switching between tab or button previous forms means content of previous tabs are there.But ideally it should get deleted once I moved to another tab or button.Can anyone tell me how to delete this once user switch to another tab or button?
Are you trying to delete data on that form you're switching to? Like in a data grid?
If so, why not just make sure the data provider is set to 0 when your selectedIndex changes on the tab or button bar? That way you would ensure that the data would be fresh when hitting that tab.?