how can connect to sql server the pivot grid view, is this possible?, I'm using php connection :)
Thanks
J.
Hello Joan,
If you have only SQL Server (and not SQL Server Analysis Services) then your option is to serialize the data in JSON using PHP and then feed the igPivotView. Here is a sample that demonstrates this scenario: http://www.igniteui.com/pivot-grid/binding-to-flat-data-source.
If you have SQL Server Analysis Services instance you can configure msmdpump.dll for http access. Then wire up the igPivotView to use the msmdpump.dll as demonstrated in this sample: http://www.igniteui.com/pivot-grid/binding-to-xmla-data-source.
Hope this helps,Martin PavlovInfragistics, Inc.
Thank you Martin, following step by step the documentation, I have set the configuration for the msmdpump.dll, but I try load the file index.html by browser and this shows this message:
uncaught exception: Exception occurred during task execution
and this doesn't work :(
my script is as follow:
$.support.cors = true;
$(function () { $("#pivotView").igPivotView({ dataSourceOptions: { xmlaOptions: { serverUrl: 'http://pbip.paradigma.com/OLAP/msmdpump.dll', catalog: 'PBI_0000_AS', cube: 'PMM Cube' } } }); });
I use the same script with your cube example then this works!
$(function () {$("#pivotView").igPivotView({dataSourceOptions: { xmlaOptions: { serverUrl: 'http://sampledata.infragistics.com/olap/msmdpump.dll', catalog: 'Adventure Works DW Standard Edition', cube: 'Adventure Works' } }});});
however, if I try connect with Microsoft SQL Server Management Studio by http://pbip.paradigma.com/OLAP/msmdpump.dll this works fine, and I can browsing it!
can you help me please?
regards.
Hello Juan,
You can use the gridOptions.defaultColumnWidth option for that. What is important to note is that it sets one and the same width for all the columns.
Here is an example code:
$(
".selector"
).igPivotGrid({
gridOptions : {
defaultColumnWidth: "150px"
}
});
Best regards,Martin PavlovInfragistics, Inc.
Hi Martin, thanks, exists one option than it can work dynamicly? this is my script, but this is my script, but this ignores all possible configurations.
$.support.cors = true;$(function(){ $("#pivotView").igPivotView({ dataSourceOptions: { xmlaOptions: { serverUrl: 'http://pbip.paradigmabi.com/OLAP/msmdpump.dll', catalog: 'PBI_0000_AS', cube: 'PMM Cube' } }, gridOptions : { alowCellAreaResizing: true, allowColumnResizing: "Indicator", allowDoubleClickToSize: true, allowMultipleColumnResize: true, minColumnWidth: 200, features: [ { name: "Resizing" } ] } }); });
thanks.
The configurations are ignored because all of the options: "alowCellAreaResizing", "allowColumnResizing", "allowDoubleClickToSize", "allowMultipleColumnResize", "minColumnWidth" are not valid gridOptions. If you want to configure "Resizing" feature you should use the igGridResizing API. For example if you want to enable double-click to auto-size column use the following configuration:
gridOptions: {
features: [
{
name: "Resizing",
allowDoubleClickToResize: true
]
If you want to dynamically resize column you can use the igGridResizing.resize API method.
In the context of the igPivotGrid the API call will look like this:
$($("#pivotGrid").igPivotGrid("grid").element).igGridResizing("resize", 1, "60px");
where "#pivotGrid" is the ID of the igPivotGrid placeholder.
Note that the second parameter is a number which denotes the index of the column that you want to resize. The column in the igPivotGrid are dynamic so you should use indexes instead of column keys.
Hi Martin
I try to run your example but I have a error message:
Error: cannot call methods on igPivotGrid prior to initialization; attempted to call method 'grid'
This is my script:
$("#pivotView").igPivotView({ dataSourceOptions: { xmlaOptions: { serverUrl: 'http://pbip.paradigmabi.com/OLAP/msmdpump.dll', catalog: 'PBI_0000_AS', cube: 'PMM Cube' } } ,gridOptions: { features: [ { name: "Resizing", allowDoubleClickToResize: true } ] }});
$($("#pivotView").igPivotGrid("grid").element).igGridResizing("resize", 1, "60px");
I want know what is wrong :(
Thanks for your help.
I didn't notice that you're using igPivotView so I send you code snippet for igPivotGrid. Try with this code:
$($("#pivotView").igPivotView("pivotGrid").grid().element).igGridResizing("resize", 1, "60px");
I don't see a problem where the data doesn't display. What I see is that the resizing of the column does not happen, because the data source is remote and the data fetch is asynchronous so the API call should be delayed until after the data is rendered in the grid. I modified your fiddle to use the igPivotGrid.pivotGridRendered event and call the API there.
Here is the result: http://jsfiddle.net/goagv0zh/1/
Hi Martin, I did try your file, and this works fine. however, in your same file I comment your script and copy and past bellow, then I've change the params for my cube, and this crash! my data don't display, so I decided try use the igPivotGrid, then I check an example in fiddle and I colaborate to implement the resizing columns and this works! http://jsfiddle.net/joankent/goagv0zh/ but when I try use the same script to implement my cube the same thing happens, the data doesn't display, I attach the scripts files for you can check this. you think that I have something wrong in my cube? What can it be?
Thanks.
Regards.
Hello Joan,The correct configuration is:$("#pivotView").igPivotView({ pivotGridOptions: { gridOptions: { features: [ { name: "Resizing", allowDoubleClickToResize: true } ] } }});
I'm attaching a working sample.
Hi Martin,
I did try your script, but I have this error message:
Error: cannot call methods on igGridResizing prior to initialization; attempted to call method 'resize'
I attach my code for you, I am sure that I'm doing this wrong.