Pivot Grid - expand rows (inside a widget)

Answered
0
0

Hi!

How can I expand the Pivot Grid rows using javascript?

May you help me, please?

Thanks,
Ulisses.

  • You must to post comments
Best Answer
1
0

Hi Ulisses,

You can use something like this in your Widget initScript:

$(this.container).data(“dxPivotGrid”).getDataSource().expandHeaderItem(“row”, [“Pasta”]);

Check out this demo from DevExpress:

https://js.devexpress.com/Demos/WidgetsGallery/Demo/PivotGrid/Overview/jQuery/Light/

BTW, if you want to use all of the JS DevExtreme controls in C# / VB.NET, we provide the complete control set as a premium extension! Send a message to sales AT wisej.com if you’re interested. We also offer the Telerik Kendo, Syncfusion Essential JS 1, and Infragistic’s Ignite UI control sets.

 

Let me know if you have any questions!

Best regards,

Levie

  • Ulisses
    Levie, I would like to insert it inside the button, using Call or Eval. Can you help me, please?
  • Ulisses
    How can the Widget show the scrollbars when the rows are expanded?
  • Ulisses
    Solved: Set Widget CssStyle: “overflow: auto;” and PivotGrid width/height = Widget width/height.
  • You must to post comments
0
0

Hi Ulisses,

I’m glad to hear you figured it out! You can also wrap up the DevExtreme (DX) widget in the context of the Wisej widget.

For example:

this.widget = $(this.container).data(“dxPivotGrid”);
Note: "this" is the client-side Wisej widget.

It makes later access of the DX widget easier.

From the Server (C#):

widget1.Call("this.widget.doSomething", arg1, arg2);

From the Client (Console in Chrome):

widget("id_XX").widget.doSomething(arg1, arg2);
Note: You can find the ID of the Wisej widget using the DOM explorer in chrome.

 

If you want to get the result of JS execution on the server, check out this post:

https://wisej.com/support/question/get-the-return-value-of-the-javascript-function-embedded-in-the-widget-control

 

HTH,

Levie

  • You must to post comments
0
0

It worked! I got it with:

Widget1.Eval(“$(this.container).data(“”dxPivotGrid””).getDataSource().expandHeaderItem(“”row””, [“”Pizza””]);”)

or

Widget1.Eval(“$(this.container).data(“”dxPivotGrid””).getDataSource().expandAll(“”Categoria””);”)

Thank you so much, Levie!

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.