cancel
Showing results for 
Search instead for 
Did you mean: 

Get Data Bind on specific grid cell as in matrix

06-22-2017 12:39 PM
1562 views 1 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

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

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Ok, I have found it.

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

Have a nice day

Answers (0)