Skip to Content
avatar image
Former Member

Get Data Bind on specific grid cell as in matrix

Hello,

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 !

Regards

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

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

    Ok, I have found it.

    DataTable dt = grid.DataTable;
    dt.Columns.Item(itemEvent.ColUID).Type

    Have a nice day

    Add comment
    10|10000 characters needed characters exceeded