On edit of a control on one expand wjFlexGridDetail impacting other expands

Posted by: muddam.kranthi on 27 August 2020, 6:16 am EST

  • Posted 27 August 2020, 6:16 am EST

    Hi Team,

    I have editable controls in wjFlexGridDetail expand, for ex textbox, dropdown,

    textarea.

    On Edit editing text on one expands deatils view is impacting the other expand details same control.

    for ex: if I change dropdown value in one expands details view, the other expand deatils same dropdown value gets changed.

    Any help how to fix this.

  • Posted 28 August 2020, 1:11 am EST

    Hi Kranthi,

    Can you let us know which Wijmo version and framework are you using?

    If you have added textbox, input controls, etc in the detail part of the FlexGrid, then they must be bound to some value in the main FlexGrid. Does the bound value not update the textbox or controls?

    Can you also provide a sample replicating your issue or some code snippets?

    Regards,

    Ashwin

  • Posted 28 August 2020, 3:56 am EST - Updated 3 October 2022, 3:37 pm EST

    Hi Ashwin,

    I am using wijmo version 5.2.

    I am not binding the input controls with the value from main flexgrid, the detail view controls are not dependent on the grid level data. for ex: I will call a API to load the dropdown. PFA, for screenshot for reference.

    Thanks,

    Kranthi

  • Posted 31 August 2020, 12:44 am EST

    Hi,

    You are binding the bento-combobox with the same model value (selectedGLAccNum). So, every time a detail row is displayed, the combobox will be created again and the value in the combobox will be same as the value of this model variable.

    Now, if you will change the value, the model variable will also be updated so any new combobox created will have the same value.

    Can you let us know your exact requirements so that we can assist you further?

    ~regards

  • Posted 31 August 2020, 2:20 am EST

    Hi Ashwin,

    Yes, I am biding to same model value for the all the expands of wjFlexGridDetail

    [(ngModel)]=“selectedGLAccNum”. As per my req, when I change a value in one control for example in my case, I have three controls dropdown, text box and text area which are editable in row details. When I change a value of any control: textbox, dropdown and textarea, in one row details, it is impacting the value of all the others row details contained control values. It should not be, only the specific row details controls value should be changed. Is there a way to achieve this. Could pls help me.

    And also I have a [disabled] property which is working fine if I expand a one details grid, but when I expand multiple details, disabled property is taking the value of latest expanded details grid.

    EX: I will expand one details grid(click on + icon) where the [disabled] property is true, works fine the drop down control gets disabled, and now I will click on another expand( click on + sign of different row) where the disabled property value of drop down control according to business will be false, It also works fines and drop down will be in enabled sate now, but the problem is the first expand details grid drop down control will also gets enabled now, which should not change it disabled state.

    I am facing this problem only with textbox, dropdown and textarea controls.

    Where as with the button controls the disabled functionality working fine.

  • Posted 1 September 2020, 1:27 am EST

    Hi,

    Regarding your 1st point, suppose you only have one combo box control in the detail row and you have used ngModel to bind it with a component variable. Now, you change this combo box’s value and the variable bound to it will get updated.

    Now, if you will open a new detail row, the combo box will be created again, and using the ngModel, it will be bound to the same variable as before. Since both the combo boxes are bound to the same variable, their values will be the same.

    In your case, each combo box is bound to selectedGLAccNum. So updating its value will affect all of the remaining combo boxes. So, this issue is expected behavior.

    If you need different values for each combo box, then bind them to a different variable.

    Regarding the 2nd issue, we are sorry but we were unable to replicate the issue at our end. Please refer to the sample link below that we used to replicate the issue.

    https://stackblitz.com/edit/angular-wxc7nq

    Can you please let us know whether we are missing something in order to replicate the issue?

    Note that in this sample, we have used Wijmo’s ComboBox but it will work the same with any other control

    ~regards

  • Posted 2 September 2020, 10:44 am EST

    Hi Ashwin,

    for First issue got fixed as I bounded data with diff variables as given.

    But second issue still exists, we are using as below code for dropdown, textbox and textarea:

    [disabled]=“item.freezeValue === ‘F’ || item.exportValue === ‘E’”

    I have also tried binding variable value from ts file like.

    [disabled]=“isGridDetailCntrlsDisable”

    But same disabled property working fine with button control where it does not have [(ngModel)].

    If I remove [(ngModel)] for textbox, text area and dropdown the disable is working as expected, but we require [(ngModel)]

    Thanks,

    Kranthi

  • Posted 3 September 2020, 2:04 am EST

    Hi Kranthi,

    I tried with a textarea element but still was not able to replicate the issue:

    https://stackblitz.com/edit/angular-ngjpo8

    If ngModel is not working, try using the following code:

    <input [ngModel] ="myMsg" (ngModelChange) ="myMsg=$event"/> 
    

    If this also does not work, can you please try disabling the textbox, etc outside the FlexGrid?

    ~regards

  • Posted 7 September 2020, 6:36 am EST

    Hi Ashwin,

    I did not understand disable controls outside flexgrid. Could please provide any sample how to disable flexgrid details screen controls outside the flexgrid.

    Thank you in advance!

    Regards,

    Kranthi

  • Posted 8 September 2020, 1:41 am EST

    Hi Kranthi,

    Please refer to the sample link below:

    https://stackblitz.com/edit/angular-cr71q6

    In this sample, I have created textarea outside of the flexgrid with the same conditions.

    ~regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels