datatable subview dymacic load

hi,i am trying to load a subview inside a datatable view.
This load must be dynamic when the user clicks on + button.

I have this snippet but there is something with subview data format i have doubt.

Which format shoud I have?

Thanks and regards!


  • Your data is ok, but there's no scroll:"auto" value. Moreover, you need to set the height of the list or its element.

    Check the snippet:

    And a bit more about the scrolling:

  • Thanks!

    2 little things;

    Here there are 2 pics i made to my datatable.

    first time i open the branch:

    second time i open the same branch

    and the snippet:

    I have an android 4.4.2 mobile

    1) First time i open a branch it does not take the height but second time it does. However, in the snippet it does.

    2) It seems to be disabled, watching that light grey background color and it does not scroll. Why? in next snippet, it has a white background color but is not scrolling.

    Thanks and regards!

  • anything new about this?

    thanks and regards!

  • Hi,

    Though I couldn't repeat the behaviour you've shown by screenshots, I can confirm the issue with list scrolling. So, you need to apply the following changes to your code:

    • remove autoheight parameter from datatable constructor, otherwise it is not scrolled even in the desktop;
    • add scrollAlignY parameter to the datatable (docs);
    • cancel scrolling for the sub-list.

    Btw, you can open the snippets in a device browser in a fullscreen mode, e.g.:

  • edited December 2015

    now, it scrolls. Thanks.

    But i have some doubts.

    1) The background color of the list (subview) is light grey, like being disabled.
    Is this ok?

    2) list height (type: { height: "350" }) is supposed to be for each element, is not it? In my mobile, it takes that height for all elements. Second one is cut.
    I set 1000 for example and now i see 3 elements, but there are more elements in the list.

    3) The "problem" with first open ans second time still persists, like screenshots i sent you.

    I need some help jeje,

    I have a 4.4.2 android mobile

    Thanks and regards!

  • edited December 2015

    (1) Background color is set to subviews by default. To remove it, redefine the CSS:

    (2) Yes, it is the height for each data element while the total height is calculated as item height * item count. Is the autoheight enabled for your subview list?

    (3) I have tested the snippet in the native browser of the Android 4.4.2 but the problem didn't show up.

    Did you try opening the snippet in a "mobile" mode on the device?

  • yes, i tried it through my mobile web browser and works. However, same code in my hybrid cordova app does not.

    It is like that autoheight property is set to false first time and second time is set to true.

    On the other hand, that light grey color only appears in my hybrid app too. In my web browser does not. i will try to remove that css style and set my own style. Your snippet seems to be other than you want it to share with me or i do not understand it.

    Also, when using lists, with last item, there is some space left at the bottom of that element. I usually add a layout row with a height of 40 and that fixes the problem.

    Now, in this datatable, there is the same "problem" and i tried to include that list into a layout and set it to the datatable subview. But that does not solve the issue.

    So what can i do?

    Ask to me whatever you want.

    Thanks and regards!

  • Yep, the first link with the CSS redefined should be Sorry for misleading.

  • Never mind!

    One thing less! Thanks!

    Now, autoheight and last item space

    Thanks and regards!

  • Anything new about this?

    About autoheight and that cut space un the las list ítem.

    Thanks and regards

  • Could you please share the snippet that illustrates both problems? In my snippet everything works smoothly, both on desktop and mobile.

    We didn't manage to spot the problem so far. Can it be connected with the functionality of your hybrid app?

  • Thanks!

    I will prepare a test proyect. I will keep you posted!

    Have a nice weekend!


  • Hi,

    i found what it is. Maybe you can help me.

    When i use fix data like in previous snippets then everything is ok but
    when i call my web service through ajax then happens the issue.

    here is a snippet where you can see a sample code. The ajax request does not work in this environment.

    But you can see how it is developed. You can change branch load and use fix data like before or you can use a web service call.

    Thanks and regards!

  • edited December 2015

    Hi, I see the problem. Subview is not resized after an Ajax call, so you need to perform it with resizeSubView method:


  • Thanks you very much!

    merry christmas!

  • Thank you) Merry Christmas to you too!

  • Hi Helga how to pass css link as dynimacally in webix

  • @deepak Could you please clarify your use case a little bit?

Sign In or Register to comment.