add support of template define for cell edit