Skip to Content
avatar image
Former Member

Get Grid Combobox selected index

Hi,

I can't get the index of selected combo box inside my grid. I can change the value of combox using only this code.

oForm.Items("grdConfirm").Specific.Columns.item(0).SetSelectedValue pVal.Row, oForm.Items("grdConfirm").Specific.Columns.item(0).ValidValues.item(0)

Thanks,

Raphael

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 06, 2015 at 05:46 AM

    Hi Raphael,

    May I know why you need the index ?

    I would usually get the Value directly from the DataTable.

    Regards

    Edy

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Raphael,

      The value you are trying to assign to this column exceeds the data size of the column.

      To get the Value Selected.

      Dim oGrid as SAPbouiCOM.Grid = oForm.Items("grdConfirm").Specific

      oGrid.DataTable.GetValue(0, oGrid.GetDataTableRowIndex(pVal.Row))

      Make sure that the 0 is the columns you are trying to set/get.

      Regards

      Edy