fixed dialog problem and selection in datatable