UDO matrix sort

Hello All:
   Currently have a UDO that user users, as it get larger there is a need to have the matrix value sorted by a different way (default of course is alphabetically against code column).
   Aside from write a new form and handle data source of the matrix myself. Any easier I can resort the exist UDO matrix?
   Thank you for any help you can give me.
Also.
    I am having a weired problem that when I change viewpanel, element does not change.
    I set the item's frompanel and topanel.. And I have the handling script that does "form.PaneLevel = " thing. I know it is something stupid as I done something like this before and stuck on this a bits before and fixed before. But that was several years ago. Can't remember what I did. Any obvious suggestion would be greatly appreciated. First part of this message is more important!
Thank You!

Matrix columns can be sort using this code
yourmatrix.Columns.Item("yourcolumn").TitleObject.Sortable = true;
when you click on matrix column header the column will sort automatically

Similar Messages

  • Sorting UDO Matrix

    Hi,
    I need help in the following:
    1. How to sort or group UDO table(s) using conditions
    2. How to enable double-click on column header in UDO matrix
    I am using VB and 2004B. Your input will be greatly appreciated.

    To my knowlegde this can't be done yet. Not in SBO2004A or in SBO2005A... Sort was part of the planned release of 2005A but it didn't make it before the release. Now the plan is SBO2005A SP1... I don't know the release plan form the B-Cluster...

  • Udo matrix -save problem

    Hi,
    i am creating a form by using UDO form generator.
    in that documet and doucument rows are existed. if user select the combobox value from the form, by taking that value and i am generating a query, i am generating a recordset. by using Userdatasources i am binding each column in matrix.
    i binded all values to the matrix successfully. but
    but when i press Add button, this matrix rows are not getting saved. and also if i have two rows, when i press add, in database only one row is adding with NULL values. how to save that matrix data?
    please help me urgent
    asap
    regards,
    nagababu

    I believe this is a duplicate of
    Udo matrix rows saving problem
    Pls read the guidelines. Don't duplicate requests, this just cause confusion and
    inefficiency in the forum. And pls remember that this is a community of very very
    busy developers, each of them with his/her "urgencies" ....

  • Dynamic condition in UDO Matrix's Column

    Hi all,
    I have a user form with a matrix. The matrix's first column has a CFL linked to another UDO MasterData Code (lets call it UDOCode).
    And on this matrix, the same UDOCode cannot be chosen more then once.
    So, I've been trying to code a dynamic CFL that filters the UDOCode's already chosen in the Column.
    Based on this thread I've achived this code:
    Select Case pVal.ItemUID
                        Case "mtx_ACORDO" '// The Matrix
                            oConds = New SAPbouiCOM.Conditions
                            With oForm.DataSources.DBDataSources.Item("@ADAT_ACORDOS1") '// The Matrix's DBDataSource
                                If .Size = 1 Then
                                    oCond = oConds.Add
                                    oCond.Alias = "Code"
                                    oCond.Operation = BoConditionOperation.co_NOT_NULL
                                Else
                                    For i As Integer = 0 To .Size - 1
                                        oCond = oConds.Add()
                                        oCond.BracketOpenNum = 1
                                        oCond.Alias = "Code"
                                        oCond.Operation = BoConditionOperation.co_NOT_EQUAL
                                        oCond.CondVal = .GetValue("U_EspPrcCd", i)
                                        oCond.BracketCloseNum = 1
                                        If i > 0 And i < .Size - 1 Then
                                            oCond.Relationship = BoConditionRelationship.cr_OR
                                        End If
                                    Next
                                End If
                            End With
                    End Select
    If Not oConds Is Nothing Then oCFL.SetConditions(oConds)
    In the matrix's first row I have no problem. All the values are there. But on the second row, no values are display in the DataTable.
    If I change the conditions from .Size -1 to .Size - 2, I get the correct values on the first and second rows, but on the third, again, no values are being display in the DataTable...
    Can anyone help me?
    Regads,
    Vítor Vieira
    Edited by: Rui Pereira on Dec 23, 2008 4:17 PM

    Hi, Erwine Sukardy
    Maybe it will be helpful if you have a specific task.
    All of items on a Form have it's own DBDataSources.
    For example, to get a table name and field name, that are Datasources to the ItemCode field in a Matrix in a  Purchase Order document, you can use this code:
    SAPbouiCOM.Matrix        tblSNs;
    SAPbouiCOM.Column      oColumnItems;           
    tblSNs = (SAPbouiCOM.Matrix)oPurDNForm.Items.Item("38").Specific;
    oColumnItems = (SAPbouiCOM.Column)tblSNs.Columns.Item("1");
    string tableName = oColumnItems.DataBind.TableName;
    string fieldName = oColumnItems.DataBind.Alias;
    HTH!

  • Udo matrix rows saving problem

    Hi,
    i am creating a form by using UDO form generator.
    in that documet and doucument rows are existed. if user select the combobox value from the form, by taking that value and i am generating a query, i am generating a recordset. by using Userdatasources i am binding each column in matrix.
    i binded all values to the matrix successfully. but
    but when i press Add button, this matrix rows are not getting saved. and also if i have two rows, when i press add, in database only one row is adding with NULL values. how to save that matrix data?
    i am sending my code here. plz help me
    ds = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
    ds.DoQuery("select a.code as Code,b.Itemname as Desc1,a.quantity as Quantity from itt1 a,oitm b where a.code=b.Itemcode and a.code=' " & oComboBox.Selected.Value & ' "")
    'User datasources creation
    oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemcode", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsItemdesc", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    oUserDataSource = oForm.DataSources.UserDataSources.Add("dsQuantity", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 40)
    ds.MoveFirst()
    oForm = SBO_Application.Forms.Item("TBL_JOBWORK_")
    oItem = oForm.Items.Item("mtx_0")
    oMatrix = oItem.Specific
    oColumns = oMatrix.Columns
    Dim oColumn1 As SAPbouiCOM.Column
    Dim oColumn2 As SAPbouiCOM.Column
    Dim oColumn3 As SAPbouiCOM.Column
    ' Dim oColumn4 As SAPbouiCOM.Column
    oColumn1 = oColumns.Item("col_0")
    oColumn2 = oColumns.Item("col_1")
    oColumn3 = oColumns.Item("col_2")
    ' oColumn3 = oColumns.Item("col_3")
    While Not ds.EoF
    oMatrix.FlushToDataSource()
    oForm.DataSources.UserDataSources.Item("dsItemcode").Value = ds.Fields.Item("Code").Value
    oColumn1.DataBind.SetBound(True, "", "dsItemcode")
    oForm.DataSources.UserDataSources.Item("dsItemdesc").Value = ds.Fields.Item("Desc1").Value
    oColumn2.DataBind.SetBound(True, "", "dsItemdesc")
    oForm.DataSources.UserDataSources.Item("dsquantity").Value = ds.Fields.Item("Quantity").Value
    oColumn3.DataBind.SetBound(True, "", "dsQuantity")
    oMatrix.AddRow()
    ds.MoveNext()
    End While
    plz help me any suggesions. in that. i want to save that matrix data in to tables. plz help me   urgent asap
    regards,
    nagababu.

    Hi,
    UDOs don't save data from UserDataSources (UDS) (and BTW: your code is wrong: you mustn't bind the UDSs to to columns time after time in the loop; that's just wrong). YOu have to handle such data in your code.
    Regards,
    Frank

  • UDO + Matrix + CFL

    Hi,
    How can put to work together a matrix that links to an UDO that works with two user defined tables (a header and a detail), and a CFL two select values from the item table to put after in the matrix and update the UOD (and the table).
    In Screen Painter I put the references, in the matrix, to the detail user table. By code I put the CFL and all works fine. But when I put the values from the CFL in the row's matrix, seems that the matrix loose the original DataSource instead the DataSource from the CFL.
    Anybody knows how put to work this three objects together.
    Thanks in advance,
    Oscar S.M.

    Hi
    Seems that you have to control the values you are passing from and to the CFL.  You can do this by using the SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST event.  Also, try to evaluate the value of the cell on the lost_focus or validate event.
    Does the value has any special formatting (such as serial number or gl account number)?
    There's a sample on the SDK , C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\17.ChooseFromList that deals with assigning values to a control on the event!
    Hope it helps

  • Matrix sort up-down arrow

    Hello,
    How I can draw the red up/down arrows in column header to indicate sort ascending/descending?
    Thanks
    Blas Gonzalez

    I don't think you can do that as far as I know...
    We can't even add a Choose From List Icon let alone a small red arrow? If you didn't get any other reply that means up till now SDK can't handle it...
    Regards...

  • Matrix with UDO

    Hi,
    I've just created an UDO Matrix. The problem I've got is I can't add data without creating a Botton to insert.
    If realized if I create the same Matrix without UDO all the fields are editable.
    Is there anything I'm doing wrong or is it a limitation for UDO objects???
    Thanks in advance.

    You must use the button, and handle the click event. Here is the code that i´m using:
             oDS.InsertRecord(oDS.Size)
            oDS.Offset = oDS.Size - 1
            oMatrix.AddRow(1, oDS.Size - 1)
    Unfortunelly, I haven´t found any other way yet.  Maybe in the SDK 2005 it is possible to handle events of the right mouse button for the matrix, but you will still need the code.
    Thanks,
    Christiano.

  • Matrix row focus

    Hey All,
    Can anyone tell me how I can set the focus of my matrix to the most recent row that was added to my UDO? I have a UDO that could have a few hundred line items and I want to move the screen to the most recent line item so that the user does not have to scroll all the way every time they open the record?
    If this is not possible does anyone know how I can reverse the order of the line items in the matrix based on the docentry or date or something like that?

    > Can anyone tell me how I can set the focus of my
    > matrix to the most recent row that was added to my
    > UDO? I have a UDO that could have a few hundred line
    > items and I want to move the screen to the most
    > recent line item so that the user does not have to
    > scroll all the way every time they open the record?
    This should do it:
    oMatrix.Columns.Item("colUid").Cells.Cell.Item(rowIndex).Click(BoCellClickType.ct_Regular,0)
    If you can't get it working for a normal cell, do it for the rowsheader and set the matrix so rows can be selected (BoMatrixSelect.Single)
    > If this is not possible does anyone know how I can
    > reverse the order of the line items in the matrix
    > based on the docentry or date or something like that?
    Can't be done... sorry... Matrix sorting is (still) not supported... Rumors is that it will be supported from SBO2006A (But it was also a rumor for SBO2005A )

  • I am Using Two Matrixs in one screen

    Dear All,
    I am working on UDO Concepts,I created one screen same as PurchaseOrder Screen Item type and service type document in this i am taking one matrix for item document and one matrix for service document  every thing is fine but while adding document  I selected Item information (Itemcode and related information) then clicked on ADD button it displaying operation completed successfully. but while using navigation buttons it showing empty information in Item matrix. For Service Document it's working fine what is the reason for this type of cases.
    Please give me the solution  ASAP
    Thanks & Regards
    Naresh

    am using only one Child table for two matrixs.Is there any problem using one child for two matrixs.
    This is your problem.
    Unless you want the matrices to be absolutely identical (including data), you will need to specify an own child table for each of them, and to databind them accordingly. Every UDO matrix should be filled from a child table.
    EDIT: I have just tried putting two matrices on a UDO-based form and they worked well. If one of your matrices isn't pupulated correctly, there must be a problem with binding.
    Edited by: Anton Shepelev on Apr 14, 2009 3:17 PM

  • UDO data adding policy

    Hello Everyone,
    I've noticed that in my UDO matrix only visible & active columns are being saved in the DB, although i do manage and set values in some fields which are not represented on matrix, through the DBDataSource. Is there any way to make it save these fields values also?
    Thanks
    Mosh

    Hello
    Yes. from B1 2007 PL 46 you have DI API Interface for UDO.
    You may try this interface.
    sample code from help
    Dim oGeneralService As SAPbobsCOM.GeneralService
    Dim oGeneralData As SAPbobsCOM.GeneralData
    Dim oChild As SAPbobsCOM.GeneralData
    Dim oChildren As SAPbobsCOM.GeneralDataCollection
    Dim oGeneralParams As SAPbobsCOM.GeneralDataParams
    'Get GeneralService (oCmpSrv is the CompanyService)
    Set oGeneralService = oCmpSrv.GetGeneralService("MainUDO")
    'Create data for new row in main UDO
    Set oGeneralData = oGeneralService.GetDataInterface(gsGeneralData)
    oGeneralData.SetProperty "Code", "First"
    oGeneralData.SetProperty "U_Data", "my data"
    'Create data for a row in the child table
    Set oChildren = oGeneralData.Child("ChildUDO")
    Set oChild = oChildren.Add
    oChild.SetProperty "U_Data", "child data"
    oChild.SetProperty "U_Type", 6
    'Add the new row, including children, to database
    oGeneralService.Add oGeneralData
    Regards,
    J

  • How to save data for Binded Matrix  in Sqlserver200(DB)

    hai all,
    i  created a Form by using Udo form generator.
    in that i bind the matrix with Userdatsources. its successfully binded to the matrix. but when i press "Add" Button the Sqlserver tables are not saved.
    if i enter values manually without binding the udo matrix, all rows are getting saved in sqlserver successfully.
    plz help me how to save the rows in the binded matrix to the tables in Sqlserver.
    Regards,
    Nagababu.

    Since you are using UserDataSources, you have to construct a function that loops through the columns, and by name and or alias you construct the INSERT and/or UPDATE query (assuming the destination table is User Defined).
    Check out this link
    Re: Matrix Processing
    Hope it helps

  • 请教:如何在MATRIX中选择一行

    各位高手,请问如何在UDO对象中,选择一行,就像批次表中那样 ,点击一行的任何地方就可以选中这行,且变为黄色。
    谢谢各位的意见。

    你是指如何通过代码选择窗体上Matrix的行?还是什么想选择UDO里数据?
    如果是前者的话用Matrix.SelectRow
    Public Sub SelectRow( _
       ByVal RowNum As Long, _
       ByVal Select As Boolean, _
       ByVal MultiSelect As Boolean _

  • SDK Wishlist

    Thought we might have a Wishlist in here where we can post your wishes for the SDK.
    I know this is not the proper channels, but since the DRQ-department is too busy to handle all DRQ's lets get the word out here.
    My Wishlist (Based on SBO2005A)
    01 - Better performance
    02 - Modal Forms
    03 - Matrix Sorting
    04 - Matrix Sum Columns
    05 - Unified event for navigation system forms (et_RecordChanged)
    06 - DI Access to UDO-data
    07 - Better access to print (DI+UI)
    08 - A way to implement "Define New" in Comboboxes
    09 - Grid - Datatables using SQL: ALIAS
    10 - Access to Document Textlines type
    11 - LinkedButtons to UDO's

    I subscribe to the above...
    Overall point is to give the SDK the same functionality and integration as built in BO functionality. (For instance make UDO's more interchangeble with built in objects)

  • Needs row description alignment in WAD Desginer...

    Hi
    In BI WAD Designer, i have 5 queries in single WAD. I wanted to have Matrix sort of presentation.
    My all queries have 1 row and 12 columns (Jan'10 to Dec'10).
    I made 60-characters description for row of each query, even in WAD they all are not ending at same alignment. Could u pls suggest me wht to do?
    Thanks

    I disabled the row heading in WAD and manually write heading as first column in WAD.

Maybe you are looking for