Skip to content

Multiple Grids Data problem from database. #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Bilalriazwork opened this issue Jan 21, 2017 · 9 comments
Open

Multiple Grids Data problem from database. #22

Bilalriazwork opened this issue Jan 21, 2017 · 9 comments

Comments

@Bilalriazwork
Copy link

I set Multiple Grids in my code successfully. butt your example with static data. i try different ways to get dynamic data from database. butt it's not work. Please help me in this case. how i can get data in multiple grids from database.
in case of single data is working proper.

@AlexanderZhukCoherent
Copy link
Contributor

AlexanderZhukCoherent commented Mar 10, 2017

@Bilalriazwork can you please provide codepen / plunker / jsfiddle / code archive to let us reproduce the issue? thanks.

@Bilalriazwork
Copy link
Author

Bilalriazwork commented Mar 11, 2017

@AlexanderZhukCoherent Thanks You Reply. I have successfully resolved this issue. I will send you sample code in working days. Thanks.
butt i face little bit other issues. can i discuss with you frequently !!

@AlexanderZhukCoherent
Copy link
Contributor

@Bilalriazwork Sure, please share your findings

@Bilalriazwork
Copy link
Author

function CollectionGrid() {

    $scope.gridOptionsPC = {
        data: []
    };
    $scope.gridActionsPC = {};
    $http({
        method: "POST",
        url: "/DashBoards/LoadCollectionGrid",
        dataType: 'json',
        headers: { "Content-Type": "application/json" },
        params: {
            dtDate: PCDate,
            dtTo: PCToDate,
            Type: PCtype
        }
    }).then(function successCallback1(response) {

        $scope.refresh = true;
        $timeout(function () {
            $scope.refresh = false;
        }, 0);            
        $scope.gridOptionsPC.data = angular.fromJson(response.data);
    });
}

@Bilalriazwork
Copy link
Author

I used This method.

@Naveen-ASI
Copy link

for me this method not working

@Bilalriazwork
Copy link
Author

Bilalriazwork commented Apr 11, 2017

you can follow this in View.
< div ng-if="!refresh" grid-data id='gridMasterPC' grid-options="gridOptionsPC" grid-actions="gridActionsPC" >
and also create $timeout object on top of angularjs

@AnishLushte07
Copy link

@AlexanderZhukCoherent @Bilalriazwork Hi, How did you resolved issue pagination and sorting if data is coming from server in multi grid. I even tried with two separate controllers for two tables but problem still persists.

@Bilalriazwork
Copy link
Author

Hi @AnishLushte07
you will just remove this code "urlSync: true", Pagination and sorting will work. you was no need to call two controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants