Datatable export to csv and excel not exporting correct data.

Datatable export to csv and excel not exporting correct data.

khadayatkhadayat Posts: 2Questions: 0Answers: 0
                    "fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {

                        if (oData.ResponseType == 1) {
                             $(nTd).text("Type 1");
                        }
                        else if (oData.ResponseType == 2) {
                            $(nTd).text("Type 2");
                        }
                        else if (oData.ResponseType == 3) {
                            $(nTd).text("Type 3");
                        }

                    }

Above code replaces the id 1,2 and 3 (from database) with the text and works fine. But when I export the datatable it exports 1,2 and 3 instead of the text Type1, Type2 and Type3. Can anyone please help fix this issue. Thanks,

Replies

This discussion has been closed.