jQWidgets Forums

jQuery UI Widgets Forums Grid grid combobx can not show when set new localdata

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  IvanNie 7 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • IvanNie
    Participant

    Hi jqwightTeams,
    i have a requirement, should use different localdata for grid combobx,
    1. first loading grid when i set a new locadata for grid combobx and call dataBind(), the combobx can not show, is empty, i do not the reason, because i set new data source for this grid combobx,
    2. also same problem, if i have a cluster combobox, e.g. plant combobx and article combobx, if i change plant combobx, then article combobx refresh with select plant number, this is ok, when i set new localdata, but when i save for this record, the article combobx also empty can not show, NOTE. the article combobox localdata also binded. i do not know the reason, could you help me for this problem?

    NOTE, change localdata data structure is same.
    i hope you can give me feedback, as soon as possible. thank you


    Stanislav
    Participant

    Hello IvanNie,

    Can you please clarify?
    You want a grid with a combobox as one of the columns, but you can’t set the combobox’s source?

    I would suggest you to take a look at this demo: Link

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/


    IvanNie
    Participant

    Hi Stanislav
    I can describe my topic again, in my requirement i have two cascading combobox in a grid, e.g. plant combobx and article combobox, so this will cause problem:
    1. i select plant combobox record -> article combobox should refresh with plant combobox this for me ok,
    so when i new choose plant combobox and article combobox and save
    in this situation if i want to show plant and article, the combobox source localdata should right, in my view i do two localdata for article one is new one is save, but after i save and change localdata for article combobox, the combobx data can not bind, this column is empty, so do not know the reason?
    is it clear for you, if you are free please reply me as soon as possible.
    thanks.


    Stanislav
    Participant

    Hello IvanNie,

    Can you please send us an example?
    I did some test with cascading comboboxes in jqxGrid.

    Best Regards,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/


    IvanNie
    Participant

    Hi Stanislav,
    In my project, not use original jquery way to load grid combobox, we package some code in order to together with angular, so i can show you some related code snippets, please see my below:
    1. first should load combobox, for showing cascading combobox, should load defferent localdata source, may be i should should show a example,
    e.g. cascading combobx plant and article, article should have different source, because of choosing different plant, so in my code may be like this
    testService.setArticlePlant(plantArray, loadArticlePlants); // plantArray is Array of all plant from db, and loadArticlePlants is callback, in
    // testService i will loop plantArray set plantNo to execute loadArticlePlants,
    // loadArticlePlants(plantNo), requiring data asynchronously, inside loadArticlePlants
    loadArticlePlants(plantNo).then(function(articleArray) { //

    $scope.articleComboSource.localdata = articleArray; // set article combobox source
    $scope.articleComboAdaptor.dataBind(); // source databind

    })

    should bind ok, the grid should show, but is empty for combobox article not show, i do not why? NOTE for normal is OK.

    2. if save, for cascading combobx i reset artcle combobox source is also empty for article combobx, not show.
    $scope.articleComboSource.localdata = newArticleSource; // set article combobox source
    $scope.articleComboAdaptor.dataBind(); // source databind

    When i debug source code for dataBind() method, i can see the combobox bind OK, i do not know the reason for cascading combobox not show in grid, even though the localdata set right way.

    @stanislav, is it clear for you?


    IvanNie
    Participant

    Hi Stanislav,
    Could you check the cascading combobox databind as soon as possible, the problem trouble me for days,

    thanks.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.