Hello guys, can we get the value of the focused cell in the grid row each time we navigate it using the button Tab ?
Can you tell us a bit more about your requirement, please?
In D365 FO grid, if we fixe a row, we can pass from a cell to other by using the TAB button (shift + TAB for the inverse). I want to get the value the cell everytime I stand on it.
I’m sorry, but this is still very vague.
Let’s start from a different end. What is the business problem you’re trying to solve?
I’m creating a master-detail interface in D365 FO. When a user navigates through the cells in the main grid (using TAB or Shift+TAB), I want to capture the value of the currently focused cell and use that value to filter or update a secondary grid displayed below. This way, the detail grid automatically reflects information related to the selected cell in the main grid.
It’s a pity that you’re still talking just about how you’ve decided to implement the solution, not about the business requirement. That prevent us to design a better a solution for you.
What you’re describing sounds very weird to me. There are many examples in F&O where you select a record in one grid and it filters records in a child grid, but it doesn’t depend on individual cells. For example, if I select an order header, a grid with order lines will show all lines with the given order ID. But it doesn’t matter which field of the order header I select - all belong to the same order ID.
In a D365 FO grid, users navigate between editable cells containing order amounts using TAB or Shift+TAB. The items are represented as columns, and each row corresponds to a different sales order.
There is a separate ‘Origin Amount’ field that holds the initial value before any modifications. I need to display this ‘Origin Amount’ in another grid below (or just text field) whenever a user stands on a cell in the main grid. This allows users to compare the modified amount with the original amount in real time.
What would be the best way to implement this in D365 FO? Thanks in advance.
It’s an unusual form design; I doubt I would even try to do it this way. But it’s difficult to argue without knowing the business requirement.
Anyway, I’m not aware any callback to server when you just select a control in the browser, therefore I don’t think that it can be implemented in the way you’ve designed it.
We have an interface that contains a grid with sales orders in rows and items in columns (this form design is obligatory for me) . We want to keep the orginal quantity after the user has modified it. Do you suggest a solution ? Thank you in advance.
Can you tell us more about your design? What is the data source of your grid?
A grid has a fixed number of columns, while the number of items is unlimited. How do you handle that? Do you have a fixed number of columns for items, logic selecting items to be displayed at the moment and some mapping between grid columns and items?
Do you want to store the original value in database or just temporarily in memory of the form?
The data source of the grid is a staging table that gets the sales order of the day in rows and a limited number in columns (we have 40 sales items).
I want to keep the original value in memory because it’s already in the original sales table (salesTable). Thank’s Sir.
You can store the original values in a collection or a temporary table. Or you don’t have to store it all; you can load it when needed.
Okay but how can we display the original quantity value if we are standing on the sales order number X and the item number Y (the cell (X,Y)) ?
Consider using a tooltip.
You can create a form showing what you want (using a form part pattern), then a menu item for it and assign the menu item to Preview Form Part property of the form control.
From args, you can get the active record and a form reference, which you’ll likely need to fetch the original value.
The idea of tooltip is very good, by overriding the tooltip method can we get the active row and column, so I can fetch the original value from the temporary table ?
Yes, when you override tooltip(), you can get this information. The column is defined by the control where you override the method, the row is the active record of the data source. But I’m not sure that the tooltip will work at all. Try it and if it doesn’t work, you can return to what I suggested (which I tested).