cancel
Showing results for 
Search instead for 
Did you mean: 

How To add Linked Button in Grid

Former Member
0 Kudos

Hi All,

Does any one Know how to add Linked button in a grid?I am with a Code

'Adding a linked Button to grid's Field(PIIndentNo)

Dim col As SAPbouiCOM.EditTextColumn

col = Me.FormGrid(enControlName.Grid1).Columns.Item("PIndentNo")

col.LinkedObjectType = "NHCL_PUR"

But The Code is Not adding any linked button to the grid ..can anyone help me out in this code or How Do i add a linked button in grid any ideas can share......Awaiting for ur reply

Regards,

Vijay Kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vijay Kumar,

You may check this:

You need a valid LinkedObject and LinkedObjectType.

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

Can u help me out in code Wise..We are using the Linked button in grid ...how do i change the properties of linkes Button in code...

Regards,

Vijay Kumar

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello freind

use this code

Dim oDataTable As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("DHIS")

Dim s1 As String

s1 = "select T1.U_VID 'VID',T0.U_DID 'DID',T0.U_DFName 'FName',T0.U_DLName 'LName',T0.U_Spec 'Specilisation',T0.U_Pres 'Prs Status',T0.U_PrNo 'Prs No' from [@PACK2]T0,[@PACK]T1 where T0.DocEntry=T1.DocEntry and T1.U_PID='" & PID & "' and not T1.U_VID='' and not T0.U_DID='' order by T1.U_VID"

oDataTable.ExecuteQuery(s1)

objGrid = oForm.Items.Item("IDrCons").Specific

objGrid.DataTable = oDataTable

objGrid.CollapseLevel = 1

objGrid.AutoResizeColumns()

oCol = objGrid.Columns.Item("Prs No") ..................(FEILDS NAME)

oCol.LinkedObjectType = "30"...............................(OBJECT ID OF TABLE)

Former Member
0 Kudos

Hi Friend,

I am with a doubt

Dim oDataTable As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("DHIS")

Dim s1 As String

s1 = "select T1.U_VID 'VID',T0.U_DID 'DID',T0.U_DFName 'FName',T0.U_DLName 'LName',T0.U_Spec 'Specilisation',T0.U_Pres 'Prs Status',T0.U_PrNo 'Prs No' from @PACK2T0,@PACKT1 where T0.DocEntry=T1.DocEntry and T1.U_PID='" & PID & "' and not T1.U_VID='' and not T0.U_DID='' order by T1.U_VID"

oDataTable.ExecuteQuery(s1)

objGrid = oForm.Items.Item("IDrCons").Specific

objGrid.DataTable = oDataTable

objGrid.CollapseLevel = 1

objGrid.AutoResizeColumns()

oCol = objGrid.Columns.Item("Prs No") ..................(FEILDS NAME)

oCol.LinkedObjectType = "30"...............................(OBJECT ID OF TABLE)

What is ("DHIS")?

What is ("IDrCons")?

Regards,

Vijay kumar

Former Member
0 Kudos

Hello freind

Dim oDataTable As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("DHIS")

hear odatatable is storage where i can sore the result of SQL statment temprary and "DHIS " is name of datatable.this datatable we can bind with grid for showing result in it.