If a device is offline (server can't communicate with it) for more than 15 minutes its icon will turn into a black box with a white question mark inside. If this device is from a Device Gateway that has been improperly decommissioned you can remove the device from the dashboard in one of two ways.
The recommended method is to go to the Administration > Devices tab and select the device. In the Edit Device window at the lower left, near Reset and Save buttons will be a Delete button. The Delete button will only appear when the device has been offline for more than 15 minutes. (see image)
If the device is offline as denoted by the Black Box with the question mark and the Delete button does not appear, you can remove the device through the SQL Managment Studio using the following queries.
My notes on this procedure are incomplete so it might take some experimenting with the following queries. I would say the first step is to get the Device ID of the device by going to the dashboard and hovering the cursor over the link to the device. The status bar in the lower left corner of the browser will include the device ID at the end of the URL.
Put the device_id in behind the = sign and execute.
--select * from eg.prop where device_id=
This is where my memory and notes fail, but perhaps the queries can help you figure it out.
--select * from eg.prop_val where prop_id= and obj_id=
--select * from eg.prop_val where obj_id=
--delete from eg.prop_val where prop_val_id=