Link button in a grid column

hi friends,
I am trying to insert a link button in my grid (column1)
I created  a user form with a grid.
Now in that grid (first column) i want to insert a link button,which will call a system form(like sales order screen)
i'm pasting piece of code (vb.net)related to my grid
so plz send me code how to get link button in my grid and where i can insert that code
' Add a Grid item to the form
        oItem = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID)
        ' Set the grid dimentions and position
        oItem.Left = 20
        oItem.Top = 100
        oItem.Width = 520
        oItem.Height = 300
        ' Set the grid data
        oGrid = oItem.Specific
        oForm.DataSources.DataTables.Add("MyDataTable")
        oForm.DataSources.DataTables.Item(0).ExecuteQuery("select DocNum from [@SALCO_H]")
        oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable")
        ' Set columns size
        oGrid.Columns.Item(0).Width = 50
        'oGrid.Columns.Item(1).Width = 60
        'oGrid.Columns.Item(2).Width = 130
        ' Get the added form object by using the form's UID
        oForm = SBO_Application.Forms.Item("frmGrid")
Thanks & Regards
SARAN

Thenks for u r reply , i gone through that link it is helpful for me but still i have a problem,
now i'm getting linkbutton but it is not performing any function,though i gave the code for that link button and related screen id like <b>2</b> for business partner or like <b>bplist</b>
and <b>one more problem</b> i was facing with grid is
i created a grid in my user screen and i want to get the <b>form settings</b> for that grid(if i click <b>(tools--->form settings)</b>.then it display form settings screen for perticular userscreen.
is it possible to get form settings for a screen having grid
Thanks & regards
SARAN

Similar Messages

  • Linked button in a Grid (SBO 2005)

    Hy,
    Is it possible to add a linked button in a grid? I saw some posts for linked buttons in a matrix but this doesn't work for me.
    The code that I use to fill the grid is:
                   Item GOrder = form.Items.Item("GOrder");
                   Grid gOrder = ((Grid)(GOrder.Specific));
                   int intCountDatatable = 0;
                   try
                        form.DataSources.DataTables.Item("TOrder").ExecuteQuery(strSQL);
                   catch
                        return;
                   gOrder.DataTable = form.DataSources.DataTables.Item("TOrder");
    If you (all) need more info, just let me know. Hope you can help...
    Joeri

    Hey Joeri!
    My guess it isn't possible; if you look through the UI-API, you'll see that there isn't a BoLinkedObject property, and no possibility to set a column to a linkedbutton type...
    Good luck,
    Rowdy
    PS: Waar was je afgelopen donderdag op de SAP Partner Dag? Behoorlijk interessante/leerzame sessie smiddags met betrekking tot de SDK...

  • How to set Link object type to grid column??

    Hello friends ,
                    I m using C# language. I want to set LinkedObjectType to the grid columns.So how can I set the Linked Obj type to the grid column?
    Reguards ,
      Mithun

    Hi,
    it should look like this.
    oGrid.Columns.Item(ColUID).Type = BoGridColumnType.gct_EditText;
    EditTextColumn col = (EditTextColumn)oGrid.Columns.Item(ColUID);
    col.LinkedObjectType = "2"; // Link to BusinessPartner
    lgDavid

  • Link button in data grid

    hi
    Can anyone tell me why the click action is not working when
    the link button is placed in datagrid.
    <mx:DataGridColumn dataField="edit" headerText="">
    <mx:itemRenderer>
    <mx:Component>
    <mx:LinkButton label="edit" click = "click1();">
    </mx:LinkButton>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    even if button is placed in the datagrid it is not working.

    When you use the <mx:Component> tag you create a new
    scope. Its as if all of the content of the <mx:Component>
    were in another file. If you used a separate file for your renderer
    you wouldn't expect click() function to be recognized, right?
    You can modify your renderer like this to make it work:
    <mx:LinkButton label="edit" click =
    "outerDocument.click1();">
    Another option is to take advantage of the bubbling feature
    of the click event. Instead of putting the click handler on the
    LinkButton, put it on the DataGrid itself. Any click on the
    DataGrid will then trigger the event handler.
    The drawback to that is that EVERY click will call the event
    handler - either the LinkButton's click on a click on the header.
    Your event handler just has to examine the event data to determine
    what control originated the event.
    In this case, using outerDocument.click() is far easier, but
    you might need the bubbling property of the event at some point in
    the future.

  • Link Button to UDO in my Grid

    hi,
    is ther a way to implement a link button im my Grid Column and bind it to an existing UDO ?
    I'm using SBO 2007A SP00 PL37.
    the following code, shows the link button and links to an item
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    i tried to link to my udo by the following but without success:
    oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = "UDO_VM_CONTRACT"
    I'm looking for a way of direct linking. Now i try to do the following workaround, but maybe there is a better way to solve this problem:
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                            If pVal.BeforeAction = False Then
                                BubbleEvent = False
                                moSboApplication.ActivateMenuItem("VmContract")
                            End If
    best regards
    Markus
    Edited by: Markus Rewak on Jul 10, 2008 11:11 PM
    Edited by: Markus Rewak on Jul 10, 2008 11:12 PM

    Hi Madhu,
    the udo object type is not working. To get the drill down functionality you have to use the item-object (4) and catch the matrix link pressed event and search the udo by your own logic.
    ' Add a link button to a column
            oGrid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
            oCol = oGrid.Columns.Item(0)
            oCol.LinkedObjectType = 4
    Case SAPbouiCOM.BoEventTypes.et_MATRIX_LINK_PRESSED
                                If pVal.ColUID = "Vnr" And pVal.BeforeAction = True Then
                                    BubbleEvent = False
                                Dim sLink As String
                                Dim oGrid As SAPbouiCOM.Grid
                                oGrid = oForm.Items.Item("Gcont").Specific
                                oGrid.DataTable = oForm.DataSources.DataTables.Item("DTcont")
                                sLink = oGrid.DataTable.GetValue(0, pVal.Row)
                                moSboApplication.ActivateMenuItem("VMarkus")
                                moSboApplication.Forms.ActiveForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
                                moSboApplication.Forms.ActiveForm.ActiveItem = "txtdocnum"
                                moSboApplication.Forms.ActiveForm.Items.Item("txtdocnum").Specific.value = sLink
                                moSboApplication.Forms.ActiveForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular)
                                End If
                    End Select
    This works very well.
    have fun
    Markus

  • Link button in grid column to UDO

    Hi,
    I read through the posts regarding linking to user-defined objects, but I found it very confusing.  Some posts say that it is not possible to create a link button to a UDO; others say you need to use the extended-object property. 
    Does anyone have code that I could use to designate a grid column as a link to a UDO?
    The code I'm using is:
    oGrid.Columns.Item(1).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
    txtColumn = oGrid.Columns.Item(1)
    txtColumn.Width = 83
    txtColumn.LinkedObjectType = ???
    I need to fill in the "???".
    If I designate an SAP B1 object type it works.
    Thanks,
    Mike

    Rasmus,
    Thanks for taking the time to provide a detailed explanation.  I think though that SAP needs to solve these kinds of problems.  It is my understanding that the main design goal of Business One is to provide an infrastructure that would reliably enable customization around it.  There is no such thing as accounting software that does not need some kind of adaptation to make it work for specific kinds of business models.  So a design that makes customization easier makes a great deal of sense. 
    If it is necessary to improvise in order to do what you need, then this design goal has not been met.  It also means that Business One is not what is managing the process because you are effectively going around it.  This in my view is actually worse than if Business One made these links work.  By forcing us to go around it, we effectively loose the data protection that Business One should be providing.  This is my take on it anyway.
    We solved the problem by opening the appropriate form with the appropriate data in it by using the double-click event.  The reason we have to do it this way is because the SDK will not even display the link button in a grid if its target is a UDO.  This brings up another reason for the SDK to be more cooperative with these efforts.  SAP has provided a detailed document describing the need to not deviate from Business One’s look and feel.  Perhaps SAP needs also to provide an SDK that more reliably and easily enables that caveat.
    If Business One had been designed from the ground up using SOA, its original design goal would be a lot easier to meet.  Maybe this is the real problem.
    Thanks,
    Mike

  • Link button to User Defined Object in Grid

    Hi,
    I'm using SAP B1 8.81 with B1DE.
    I have added a grid which is populated from a DataTable to a form.
    One of the columns in the grid contains the DocEntry of a User Defined Object.
    How can I display a link button on the grid ?
    Regards,
    Ben

    Hello Ben,
    You need to set the column object type.
    Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific
    oGrid.Columns.Item("DocEntry").Type = BoGridColumnType.gct_EditText
    Dim oEditCol As SAPbouiCOM.EditTextColumn = oGrid.Columns.Item("DocEntry")
    oEditCol.LinkedObjectType = "2" 'The SDK documentation says you should use the value 0, but in previous versions it didn't work, so I recommend you user a value other than -1 or 0
    You then need to catch the et_MATRIX_LINK_PRESSED event and other your user form...
    From the SDK Help File regarding the BoLinkedObjectType enum
    lf_None -1 No target object
    lf_UserDefinedObject 0 User-defined object
    lf_GLAccounts 1 G/L account object
    lf_BusinessPartner 2 Business Partner object
    lf_Items 4 Item object
    lf_SalesEmployee 53 Sales employee object
    Regards,
    Vítor Vieira

  • How to add linked button in grid?

    Hi,
    Does anyone know how to add linked button in a grid? I can't find it but i saw someone ask similar question but seems none of them works.
    Thanks a lot!
    P.S. For some reason, i can't use matrix because the data is from a SQL query.
    Lan

    Hi,
    as far as I know it is not possible, since this adjustment is made for the whole column. I have created a grid and I open the shown document by double clicking the row header. In the grid I can see if it is sales or purchase and so I use a workaround by opening the specific system form (e.g. sales invoice) in find mode and search the document by document number (also shown in the grid).
    Sample:
    oSBOapp.ActivateMenuItem("2053"); //sales invoice
    oForm = oSBOapp.Forms.ActiveForm;
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE;
    oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("8").Specific;
    oEdit.Value = Convert.ToString(dNum);
    oForm.Items.Item("1").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
    By the click event, you get the specific row number. Hope it helps...
    Regards
    Sebastian

  • Link Button In Grid or Matrix ?

    Hello,
    I'm trying to populate a grid with data from a SQL query, using a datatable datasource, but I don't know how to specify which fields are to have drill-down(link buttons). After looking at this thread :
    Linked button in a Grid (SBO 2005)
    I'm left wondering how the Business One Report Generator can generate a grid with link buttons attached to the appropriate fields, when it is only given a SQL query.
    I'm thinking I might have to use a matrix, but how can i populate the matrix when if i don't know what the SQL query will be in advance?, also can I achieve the grouping using a matrix that the grid automatically does ?

    Hello Welch,
    Both Matrix and Grid can work with LinkButton. And regarding Grid, first of all, you need to define the gridcolumn type as gct_EditText, then in EditTextColumn Object, there is a property named LinkedObjectType, please set the property as in Matrix column.
    ' First define the column as EditText type
    oCol = oGrid.Columns.Item("Col1")
    oCol.LinkedObjectType = 4
    Hope this helps,
    Nick

  • Link button on Grid

    Hi everybody:
       Just I'd like to know if I can have a link button in a grid object, such as it exists in the matrix object, an how i can get it.
       Thanks in formward
      Regards.
      Misael Reséndiz.

    Misael,
    If you use the Search feature in this forum on "link button on grid", you should find many helpful posts such as this one ...
    Link button in Grid
    Eddy

  • How to add link button in Query generator

    Hi,
    I am trying to add link button in Query reports. While the query is for system table it automatically gives columns with link button  but how to do this for user Tables.

    Hi,
    Even by standard, this is not possible only when you using UDO.
    You can create your form with Matrix, and use FlushToDataSource Method to load large amount of data inside. Now you can program the linked button click (et_MATRIX_LINK_PRESSED) by columns.
    Regards,
    J.

  • Link Button to User Table

    Hi. I have tried to search for this but cant get anything. I know how to add a link button to a matrix column when the link is to an SBO Business Object. what i need to do is to add add a link button to a user table.

    Hi,
       Sorry for delayed reply. I will be active in weekends.
    STEP 1: Catch The Event
    STEP 2: Load The New Form using code and Keep the form invisible
    STEP 3: Assign The Key Value To The form through your coding
    STEP 4: Navigate to Key value through code/write logic to get retrive details for given Key value of scree
    STEP 5: Make the form visible.
    HTH.
    With Regards
    B.Ravi Shankar

  • Placing Link button in Report

    Hi All.
    I am generating a report using query generator..In that i want to place a link button in a particular column...Whether its possible..

    Hello,
    Jing is correct.
    Along with this you have to consider following things:
    The Column should come from Base Table only. If the column is the union of one or two tables then link will not appear.
    ex: Select 'OITM' IT, ItemCode,ItemName from OITM
    Link will appear here
    ex:
    Select 'OITM' IT, ItemCode,ItemName from OITM
    UNION ALL
    Select 'RDR1' IT, ItemCode ,Dscription ItemName from RDR1
    Link will not appear.
    Regards
    Sanjay

  • Link Button In Grid

    Hai To All,
                 Iam creating reports for my module. For that iam using grid to  display the fields. Now my issue is i want to place the link button(Orange arrow) for specific fields.
    For Example,
    For Supplier Code iam placing the following code so that i can able to get view the link button and if i click i can able to open the Business Partner.
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = 2
    Similar to that i want to create link button for my user defined screen that is my screen.I registered as UDO as "PI_UDO"
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = "PI_UDO"
    If i give "PI_UDO" as my linked object it is not accepting.No error display also....
    If i use none option for linked button,
    Grid.Columns.Item(0).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                                    Dim oCol As SAPbouiCOM.GridColumn
                                    oCol = Grid.Columns.Item(0)
                                    oCol.LinkedObjectType = -1
    I cant able to view the link button......
    Weather we can able to create link button for our screen???
    In Forum someone told that we can....But some told as cannot??
    What is the solution for this???
    Its an urgent requirement can anyone help me.......
    Regards,
    Anitha
    Edited by: ani nazir on Jul 30, 2008 11:06 AM

    Thanks Petr,
    If i use like that i can able to open the screen but there is an error
    "No Matching Records found in Business Partner"
    In Matrix Item Link press event i made bubbleevent=false
    Regards,
    Anitha

  • SP01 PL03: Click on Grid Link button, add-on disconnected error occured

    Hi Frank,
    I upgrade my add-on to SP01, there is an error when click Link button which in a UDT bound grid, the error shows 'System Message' with three option buttons, [Restart Add-on],[Log off the current company] and [Continue working without this Add-on], this error does not occur on SAP 2005 PL7,PL8, PL9 & PL10, but occurred on SP01 and SP01 PL03.
    The grid Link button link to master like BP, G/L Accout and Item.
    Hope there is a workaround way.
    Thanks.

    What version / PL was your Add-On compiled with before?
    Was it done with 2005A SP00 PL?? ?
    Anyway, I am happy to hear that it works now...
    regards,
    Frank

Maybe you are looking for

  • Problem with applications and accessing database

    Hi I have a serious problem with my applications.I was trying to change "users"'s folder icon so I changed the setting in information.I don'y know what I did but It made these problems: many of applications does not open for example itunes-->The fold

  • Purchase Price Variance Report completes with error status

    Dear Members, I am using R12.1.3 Vision Instance. When I ran the report Purchase Price Variance Report, it completed with an error. The error message is :- Enter Password: REP-1212: Object 'F_h_report_date' is not fully enclosed by its enclosing obje

  • Strange behavior when creating a document with an "html" node

    A strange thing is happening here. I'm using the javax.xml.transform.Transformer to save some XML documents. I can create documents with any arbitrary DOM tree I want, but if I have the root node have a name of "html". somehow the Transformer decides

  • 6300 power saver & sleep mode

    Hello, My problem is that after only one week that passed after I bought a Nokia 6300 my power saver and sleep mode stopped working. I tried turning them on and off or even put one on "off" and the other one "on" but it seems they just stopped activa

  • Mail marks receipt time earlier than actual

    In a small office with 5 macs. One of two running 10.4.10 using mail shows time received (in the upper part of the message) as 28 minutes earlier than when they were actually sent. The other mac does not have this problem. With the problem one, print