on 08-06-2010 7:20 AM
How can we hide a column in matrix permanently ?
Hello,
'Hide in runtime
oMatrix.Columns("COLID").visible = false
'Hide by column preferences for specific users
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oFormPreferencesService As FormPreferencesService
Dim oColsPreferences As ColumnsPreferences
Dim oColPreferencesParams As ColumnsPreferencesParams
Dim i As Integer
'get company service
oCmpSrv = oCompany.GetCompanyService
'get Form Preferences Service
oFormPreferencesService = oCmpSrv.GetBusinessService(ServiceTypes.FormPreferencesService)
'get Columns Preferences Params
oColPreferencesParams = oFormPreferencesService.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams)
'set the form id (e.g. A/R invoice=133)
oColPreferencesParams.FormID = "133"
'set the user id (e.g manager= 1)
oColPreferencesParams.User = 1
'get the Columns Preferences according to the formId & user id
oColsPreferences = oFormPreferencesService.GetColumnsPreferences(oColPreferencesParams)
oColsPreferences.Item("COLUID").VisibleInForm = BoYesNoEnum.tYES
'update changes
oFormPreferencesService.UpdateColumnsPreferences(oColPreferencesParams, oColsPreferences)
regards
János
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mahesh and János.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi raveendra,
oColumn = oMatrix.Columns.Item("V_0")
oColumn.Visible = False
Thanks,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.