sensing the connect/disconnect events and updating the corresponding ddl