Detect if layer contains any data?

Discussion created by risto45 on Feb 8, 2012
Latest reply on Feb 8, 2012 by DSwingley-esristaff
Can anyone say how can I detect if layer contains any data?

There is a list of layer checkboxes next to the map that user can activate/deactivate. The layers are retrieved from third-party map server.
Layers are about distribution. I only want to show layers that contain any data about distribution (not all objects are present on all layers).
Does anyone know how I can do that?