event handler and detail table update