Skip to Content

Get Data Bind on specific grid cell as in matrix

Jun 22, 2017 at 10:39 AM


avatar image
Former Member


I am developing the addon for SAP Busines One using C# and SAP B1 SDK.
I need to know what type of field in database is displayed in specific cell in in grid or matrix.

If I have binded table name as well as alias of field this is easy to execute query to database (values are stored in CUFD table).
As I know Grid is not linked to database directly, so maybe there is possibility to know if the cell is alphanumerical or memo based on Grid object ?

For a matrix this issue is simply. Being in event handler I can write:

Item item = itemEvent.CurrentForm.Items.Item(itemEvent.ItemUID);
Matrix matrix = item.Specific;EditText cellEditText = matrix.GetCellSpecific(itemEvent.ColUID, itemEvent.Row);string alias = cellEditText.DataBind.Alias;string tableName = cellEditText.DataBind.TableName;

However I can't find a clear way for grid situation. I would start like this:

Item item = itemEvent.CurrentForm.Items.Item(itemEvent.ItemUID);
Grid grid = item.Specific;<br>

Now I would like to know if a specific cell (column and row) is memo type or not.

Or at least the tablename and alias of a database binded field.

Thank you in advance and have a productive day !


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Jun 22, 2017 at 11:06 AM

Ok, I have found it.

DataTable dt = grid.DataTable;

Have a nice day

10 |10000 characters needed characters left characters exceeded