I know it should be easy, but I wasn’t able to change the mouse cursor while it is on a dynamicMapServiceLayer.
No this is not easy at all and is highly likely to be impossible. A dynamicMapServiceLayer is an image that is requested from the server and thus will not have mouse events for the feature that are displayed in the image. You would need a muse event to trigger the cursor change. the way that popups are displayed for a dynamicMapServiceLayer is on mouse click a query is sent to maps layer to see if the mouse click intersects the layers features (like an identify). So sending a query each mouse change to see if you are over a feature in your dynamicMapServiceLayer would be impractical.
again Thank you very much,
i used feature service instead.
Retrieving data ...