cnizzardini / cakephp-datatable

CakePHP Component for interoperability between CakePHP 2.x and jQuery DataTables plugin.
62 stars 49 forks source link

Datatable not loaded #31

Open shidhu40 opened 9 years ago

shidhu40 commented 9 years ago

After fetching my array comes likes $contacttracker = $this->DataTable->getResponse();

Array ( [sEcho] => 1 [iTotalRecords] => 1071 [iTotalDisplayRecords] => 1 [aaData] => Array ( [0] => Array ( [Contacttracker] => Array ( [id] => 746 [account_id] => 5438d71c-feac-4d1f-b1b6-0e14a20d8c6a [contact_id] => 559a4557-21e0-4bef-a160-126834ca3af4 [company_id] => 544498d7-5c60-4430-887e-11f6a20d8c6a [user_id] => [stage] => Contract [status] => [active] => 1 [created] => 06-Jul-2015 2:37 pm [createdby] => 5438d71c-4170-47bb-b9e1-0e14a20d8c6a [modified] => 06-Jul-2015 2:37 pm [modifiedby] => 5438d71c-4170-47bb-b9e1-0e14a20d8c6a )

                [Company] => Array
                    (
                        [id] => 544498d7-5c60-4430-887e-11f6a20d8c6a
                        [name] => IBM
                        [officephone] => 
                        [stage] => Client
                        [Clientcontract] => Array
                            (
                                [0] => Array
                                    (
                                        [status] => 1
                                        [id] => 5444995a-e3dc-42ee-9d72-0b98a20d8c6a
                                        [company_id] => 544498d7-5c60-4430-887e-11f6a20d8c6a
                                    )

                            )

                    )

                [Clientcontact] => Array
                    (
                        [id] => 559a4557-21e0-4bef-a160-126834ca3af4
                        [firstname] => Amrata
                        [lastname] => Singh
                        [title] => 
                        [phonecountry] => 
                        [phstd] => 
                        [phone] => 
                        [mobcountry] => 
                        [mobile] => 
                        [bcountry] => 
                        [boardstd] => 
                        [board] => 
                        [extn] => 
                        [email] => 
                        [status] => Active
                        [city_id] => 22
                        [City] => Array
                            (
                            )

                    )

                [User] => Array
                    (
                    )

            )
        )

    )

in view file I have use $('#editable').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "<?php echo $this->Html->Url(array('controller' => 'contacttrackers', 'action' => 'index','accounts'=>true)); ?>", "bSort" : false, "aoColumns": [ {mData:"Clientcontact.firstname"}, {mData:"Company.name"}, {mData:"Company.stage"}, {mData:"Company.stage"}, {mData:"Company.stage"} ] });

cnizzardini commented 8 years ago

Are you using the Linkable Behavior or Containable? I suggest using Linkable.

shidhu40 commented 8 years ago

It is containable behavior. As we know datatable has maximum limit of 400 rows . I have greater then 400 records . How can I fetch

cnizzardini commented 8 years ago

I've never heard of this limitation...

shidhu40 commented 8 years ago

What ever I want to load data with ajax code mentioned above.

jjzieve commented 8 years ago

Ya know Chris, you shouldn't have to respond to people being dicks. If people don't want to work through a problem themselves, you don't have to oblige them. Haven't used your library in a while, but I appreciate the work you put in. Just my two cents.

On Tue, Oct 13, 2015 at 9:53 PM, shidhu40 notifications@github.com wrote:

What ever I want to load data with ajax code mentioned above.

— Reply to this email directly or view it on GitHub https://github.com/cnizzdotcom/cakephp-datatable/issues/31#issuecomment-147934598 .

cnizzardini commented 8 years ago

I think its partly a language barrier here, could be a dick as well. And thanks!

jjzieve commented 8 years ago

Good point, didn't think of that. Keep doin' what you're doin!

On Thu, Oct 15, 2015 at 11:01 AM, Chris Nizzardini <notifications@github.com

wrote:

I think its partly a language barrier here, code be a dick as well.

— Reply to this email directly or view it on GitHub https://github.com/cnizzdotcom/cakephp-datatable/issues/31#issuecomment-148473845 .

shidhu40 commented 8 years ago

It is simply two dimensional array. Can you please resolve with your simple two dimensional array. According to your given array I will resolve my issues.