Hi,
Can I hide XamPivotGrid areas?
p.e. how could I hide RowArea?
Regards,
Dimitris
Hi
There is properties which expose the controls in different areas of pivot grid. Below is a list of them. You can set thier Visibility property to collapsed to hide them.
xamPivotGrid.RowsDropControl.Visibility = Visibility.Collapsed; xamPivotGrid.ColumnsDropControl.Visibility = Visibility.Collapsed; xamPivotGrid.FiltersDropControl.Visibility = Visibility.Collapsed; xamPivotGrid.MeasuresDropControl.Visibility = Visibility.Collapsed;
If you want to change the layout of pivot (position of diferent areas), then you should apply new cotrol template with layout within it.
RegardsTodor
I have a XamPivotGrid and I get RowsDropControl = null
You can try to put this code in pivotGrid.Loaded event handler. Then the UI should not be null
Todor
well i wrote in the function in 2 ways, and still the same , it null
this.pivotGrid.Loaded += pivotGrid_Loaded;
void pivotGrid_Loaded(object sender, RoutedEventArgs e) { ((XamPivotGrid)sender).RowsDropControl.Visibility = System.Windows.Visibility.Collapsed; ((XamPivotGrid)sender).ColumnsDropControl.Visibility = System.Windows.Visibility.Collapsed; pivotGrid.RowsDropControl.Visibility = Visibility.Collapsed; pivotGrid.ColumnsDropControl.Visibility = Visibility.Collapsed; pivotGrid.FiltersDropControl.Visibility = Visibility.Collapsed; pivotGrid.MeasuresDropControl.Visibility = Visibility.Collapsed; }
in this case are you sure you have not changed the style for the control. I mean do you apply new style for contol in which the control parts are missing.
Well as far as i know, i dont think so
am trying to hide the area where it says:Drop filter fields here, msval, and sDate
plz find attached the code for clarification
I saw you use Silverlight 5. We have not built and tested the control against this version of SL. I am sure this is the reason you get null element data
I ended up using the OnLayoutUpdated event and the various Drop controls were not null and could be collapsed in that event. Just remember that this can be called quite a few times (and not just once like the OnLoaded event).
I tried the same thing that nharake did and put the code in both OnLoaded events and the controls are still null. I tried the OnLoaded of the containing UserControl and in the xamPivotGrid. The MeasuresDropControl was null as well as quite a few others.
thanks alot,
can i know when is the release of the 11.2?