Xcode installed but not recognized on App Store i installed xcode directly from a dmg that i downloaded from developer site at apple, now on the app store shows up as it were not installed,(it shows install button)

How i can tell to the app store that is already installed?
You can't make the App Store recognize an Xcode installed from a dmg. Besides that, the dmg distribution method is not used by Apple any longer so you most probably got an old Xcode version anyway.

New versions of Xcode are only distributed via the App Store. Just download/install the most current version of Xcode from the App Store again (it's free anyway)