update checkbox and button status according item selection