Duplicated code on AdvanceGrid removed