Hello,
how can I attach an event to a pivotgrid inside a pivotview?
i'd like to expand the tuples, but the pivotview does not expose the event as the pivot grid does, and I can't seem to get the event to fire correctly.
thanks...
Hello Rob,
The easiest way to do this, is to find the igPivotGrid widget in the igPivotView and use the jQuery's "bind" function. Here is an example:
$("#pivotview").find('.ui-igpivotgrid').bind("igpivotgriddatasourceinitialized", function (evt, ui) { // Callback function code... });
That way you can bind to each event of the igPivotGrid. The same goes for the igPivotDataSelector - you just need to find the DOM element which contains the widget and use the "bind" function the same way. Hope this helps.
Thanks,
Martin Stoev
thanks, I tried this, but the event doesn't fire. I also don't get any errors.
dataSource = new $.ig.OlapXmlaDataSource({
serverUrl: 'http://sampledata.infragistics.com/olap/msmdpump.dll',
catalog: 'Adventure Works DW Standard Edition',
cube: 'Adventure Works',
rows: '[Date].[Calendar]',
columns: '[Product].[Product Key]',
// filters: '[Product].[Product Key]{[Product].[Product Key].&[AR-5381]}',
measures: '[Measures].[Internet Order Count]'
});
$('#pivotView').igPivotView({ dataSource: dataSource });
$("#pivotview").find('.ui-igpivotgrid').bind("igpivotgriddatasourceinitialized", function (evt, ui) {
alert('fgf');