New version doesn't seem to bind the null columns

New version doesn't seem to bind the null columns

3sharad3sharad Posts: 3Questions: 1Answers: 0

Hi,

I have run into some issue with respect to columns which are null.

As I changed the version of datatable, I see that the null columns though present in the data array are not being bound to the datatable.

I check the row in raw data array where I have the null columns and then in the bound row where they are missing.

This was working fine in earlier version as well in the beta version of 1.10.

Is there some setting parameter to set the defaults?

Appreciate any help.

Regards,
Sharad

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Can you link to a test case showing the problem please?

    Allan

  • TronikTronik Posts: 120Questions: 27Answers: 1

    This must be related to my issue with the use of fnFilter since updating.

    I know I must provide with test case, but Im having some trouble with that.

    Sharad:
    My non-elegant solution was to replace the null value with "&nbsp ;"

  • 3sharad3sharad Posts: 3Questions: 1Answers: 0

    Thanks Allan and Tronik.

    Tronik, I saw your post. It's happening because of the null values. Can you tell me how did you do the replacement in an optimized way?

    Allan: It's on my local, so difficult to create the case. However, I checked using console by just changing the version. The row after binding doesn't have the columns which are completely blank.

    Thanks,
    Sharad

  • TronikTronik Posts: 120Questions: 27Answers: 1
    edited July 2014

    Sharad, not sure its an optimized way but like this:

    "aoColumns": [
                 {
                    "mData": "id",
                    "mRender": function (data, type, full) {
                            if(data == '' ){
                                return " ";
                                }
                            else{
                                return data;
                                }
                    }
                }
            ]`
    
  • 3sharad3sharad Posts: 3Questions: 1Answers: 0

    This has to be done for all columns or a generic code can be put to handle all columns.

    Thanks in advance.

This discussion has been closed.