I am using
ajax_command_replace method in my ajax_callback function . its working fine its replacing my whole table.. But I just need to add
tr on the table after submit a ajax form if data exist. what should I use for this.?
The HTML wrapper you will be replacing sounds like it includes the whole table, so when you return the markup for the new table row, it will replace all the content in that selector/wrapper. You need to include the markup for your whole table including the newly added row, not just the new row.