Dataset property not working.

Forum to discuss the new web client version of Servoy.

Re: Dataset property not working.

Postby ashutoslenka426 » Wed May 24, 2017 2:36 pm

what does documentation of the component mean ? The ordering in the spec file ?
https://js.devexpress.com/Demos/WidgetsGallery/Demo/Pivot_Grid/LocalDataSource/AngularJS/Light/
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: Dataset property not working.

Postby patrick » Wed May 24, 2017 3:26 pm

I mean the documentation of the pivot component you are trying to wrap...

How do you currently try to provide your adjusted dataset to the pivot?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Dataset property not working.

Postby ashutoslenka426 » Wed May 24, 2017 3:29 pm

On the onload of the form . This code -
Code: Select all
elements.Pivot_Grid_2.pivot(data);



Code: Select all
$scope.api.pivot = function(data) {
           console.log(data);
             source = data;
                       
             $scope.pivotGridOptions = {
                   allowSortingBySummary: false,
                   allowSorting: false,
                   allowFiltering: false,
                   allowExpandAll: false,
                   height: 440,
                   showBorders: false,
                   fieldChooser: {
                       enabled: false
                   },
                  dataSource: {
                       fields: [{
                          
                           dataField: "city",
                           area: "row"
                       },
                  {
                           dataField: "telephone_nr",
                           area: "column"
                       }, {
                          
                           dataField: "sys_owner_id",
                           area: "data"
                       }],
                       store: source
                   }
               };
         }   
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: Dataset property not working.

Postby patrick » Wed May 24, 2017 3:33 pm

I mean client side. At some point you do this, right?

Code: Select all
$scope.pivotGridOptions = {
        allowSortingBySummary: true,
        allowSorting: true,
        allowFiltering: true,
        allowExpandAll: true,
        ...
}


I would like to see the code of your component's api implementation...
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Dataset property not working.

Postby ashutoslenka426 » Wed May 24, 2017 3:35 pm

Code: Select all
<div id="sales"  dx-pivot-grid="pivotGridOptions"
class="pivotGrid"
>
</div>


Code: Select all
controller: function($scope, $element, $attrs) {
                var source="";
//         var datasource;
         $scope.api.pivot = function(data) {
           console.log(data);
             source = data;
                       
             $scope.pivotGridOptions = {
                   allowSortingBySummary: false,
                   allowSorting: false,
                   allowFiltering: false,
                   allowExpandAll: false,
                   height: 440,
                   showBorders: false,
                   fieldChooser: {
                       enabled: false
                   },
                  dataSource: {
                       fields: [{
                          
                           dataField: "city",
                           area: "row"
                       },
                  {
                           dataField: "telephone_nr",
                           area: "column"
                       }, {
                          
                           dataField: "sys_owner_id",
                           area: "data"
                       }],
                       store: source
                   }
               };
         }   
        
        
      },
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: Dataset property not working.

Postby ashutoslenka426 » Thu May 25, 2017 1:00 pm

Thanks for your replies . I am thinking to be one problem . Here I am calling the api . I am sending the data from servoy to js . When it is sending the data and the time pivot grid is getting rendered . Both are mismatching hence not populating the data . So I am thinking of using the
Code: Select all
$scope.servoyApi.callServerSideApi("mycallback",["test",1]).then(function(retValue) {
   console.log(retValue);   
})

But this is not working . This is not calling the servoy function

What is this ?

Code: Select all
$scope.mycallback = function(name,type) {
    return "something";
}


where to write this ? .

Please provide your suggestions .
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Previous

Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 16 guests

cron