cancel
Showing results for 
Search instead for 
Did you mean: 

Binding Datasource to matrix

former_member275826
Participant
0 Kudos

Hi,

Can we bind dataset to matrix in SAP same as we can do in windows form?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI PRAVINAUG17

its better to use Record set for binding Matrix .

Refer this below code .

oRecordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

oRecordset.DoQuery("Select U_Code from [@STPROPMST]")

oMatrixProp.AddRow(oRecordset.RecordCount)

For Index = 1 To oRecordset.RecordCount

oMatrixProp.Columns.Item("cProp").Cells.Item(Index).Specific.value = oRecordset.Fields.Item("U_Code").Value

oRecordset.MoveNext()

Next

Thanks

kalpen

Former Member
0 Kudos

Hello.

I guess you are referring to System.Data.DataSet. I don't think it is possible to bind that to matrix objects. You will have to use the DataTable object from the Business One API.

former_member275826
Participant
0 Kudos

Thanx to all for ur replies.

Dominik,

How can i achieve my goal using datatable?

can u plz explain with example?

Former Member
0 Kudos

Hi,

Check these first:

Thanks,

Gordon