Our blazing fast Grid component built with pure JavaScript


Post by sipi41 »

Dear friends, sorry to bother you again but we are breaking our heads with some updates we would like to reflect in our gridTree. First of all, I would like to show you how this looks so you have an idea of the result:
Image
As you can see, I have a list of Locations/Projects etc then inside a list of employees, I have added a new selector to assign a team to such employee... as you can see the employee Guillermo can be in múltiple projects, in other words, it could be twice on startup, once in Pos/Prog, etc... When I add a new employee, the selector disappears (this is expected) as we don't have an employee Id.

Problem #1. In the cell that holds our team selector, we placed a condition that if the rowId does not starts with "Leaf" or Id is null, then return false, in other words, if any of these are missing should not display the team selector, and it works fine EXCEPT when we create a new employee position, at the beginning it does not have id, but after we choose an employee from the list, it shows the Id has changed but it does not display the selector... in other words it stays just an empty cell unless we refresh the selector is not shown... what could be the best approach here? please check our code below:
Image

Problem #2 When changing the team for an existing employee, it works for the current row but as we have this employee in several other rows, what would be the best approach to notify that this person's team is not the same anymore and update the value on the selectors of this employee? as this could be in several other rows...

I was expecting to update the employeeStore (a store we created to hold employees info) but this doesn't seems to work, I also tried to call GRID.refreshColumn or GRID.refreshRows but nothing seems to work and I get an ugly error saying: "Maximum call stack size exceeded"... maybe not a good approach here...

Thank you for your kind help and guidance.


Post by Animal »

It should Just Work with no configuration or jiggery pokery.

The column should be the team_id field so

{
    text : 'Team',
    field : 'team_id',
    widgets : [{
        type : 'combo',
        store : gridSourceData.teamDropdowns,
        displayField : 'textValue'
    }]
}

The value of the team_id field of the task record is automatically set into the value property of the widget.

So if your TaskModel subclass has a team_id field, and the gridSourceData.teamDropdowns is a valid store with ids of teams and team names, this is all you need.


Post by sipi41 »

Thank you for your reply, unfortunately, this doesn't work, none of both problems are resolved. Any other ideas? As you said... this should work but does not and we are just crazy to know why not... its a simple dropdown.


Post by Animal »

The widget takes its value from the field defined in the column definition. If the store has an id of that value it will work.

I cannot get my head around the complexity of what you posted above.


Post by sipi41 »

Its not complicated, something is making this not work... I can offer you remote screen for you to see, its better that way I think... its a list of positions, lets call it like that... so we have 3 stores, the first is the "rowDataStore" which is the one you see on screen, the other 2 stores are as follow: employeeStore (hold employee info) and teamStore which holds the teams info... so for each raw of "RowDataStore", we want to display a cell that contains a drop-down with a list of teams, that has preselected the team the employee has and if changes, updates the employee accordingly, and also, updates the data we are seeing on screen... the first image could provide you with a better idea of how it works just by seeing it.

In the following image, you can see that even if the dropdown takes its value from the store and that it shows the store has been modified, the record below (as is the same userid) still show old information... (on the far right you can see the ID, on the far right the selector and console)

Image


Post by mats »

Could you please upload a small test case that we can run and debug?


Post by sipi41 »

Mr. Mats, again thank you for your kind attention. See, this project is developed for Intel (the guys that make chips) and, unfortunately, I can't send you some source data as they prohibit such thing, BUT I can open my screen for you to remote and we can check together, that would be something I can do, just name time and I'll be here, we can use google remote desktop or any tool you may like... PLEASE we need help with this, thank you so much!


Post by mats »

We don't offer free live remote help I'm afraid, you are welcome to purchase a few Professional Services hours if you want a dedicated resource to help you. Please see https://www.bryntum.com/services/ for details.


Post by sipi41 »

Ok I will ask and prepare a sample for you if they approve it. Where should I send it? ( As I know for sure they will not approve it published publicly) thank you for your help


Post by mats »

You can send it to support[at]bryntum and please write here when it's sent.


Post Reply