Description
Updates the column preferences of a specified form for a specified user with the data specified in ColumnsPreferences data structure.
Syntax
Parameters
Example
The following is a VB.NET sample that updates the width of all the visible items in the invoice form settings.
| UpdateColumnPreferences (Visual Basic) | Copy Code |
|---|
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oFormPreferencesService As FormPreferencesService
Dim oColsPreferences As ColumnsPreferences
Dim oColPreferencesParams As ColumnsPreferencesParams
Dim i As Integer
oCmpSrv = oCompany.GetCompanyService
oFormPreferencesService = oCmpSrv.GetBusinessService(ServiceTypes.FormPreferencesService)
oColPreferencesParams = oFormPreferencesService.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams)
oColPreferencesParams.FormID = "133"
oColPreferencesParams.User = 1
oColsPreferences = oFormPreferencesService.GetColumnsPreferences(oColPreferencesParams)
For i = 0 To oColsPreferences.Count - 1
If oColsPreferences.Item(i).VisibleInForm = BoYesNoEnum.tYES Then
oColsPreferences.Item(i).Width = 100
End If
Next
oFormPreferencesService.UpdateColumnsPreferences(oColPreferencesParams, oColsPreferences) |
|
See Also