Объявление

Свернуть
Пока нет объявлений.

changing layout of request-list in form

Свернуть
X
  • Фильтр
  • Время
  • Показать
Очистить всё
новые сообщения

  • changing layout of request-list in form

    Hello,
    in my form it should be possible that the user can Change the layout of the request list. He should be able to choose from the created layouts.
    Any idea how to do this ?
    Thanks for your help
    Helmut

  • #2
    No. Initially user works with layout which configured by administrator. User can change layout of request list control, and changes remembered if you set "Remember layout in database" property in "ActiveXControl Properties" of request list. But user has not ability to choose one of views or layouts for request list.
    С уважением, Сергей Осадчий

    Комментарий


    • #3
      Hello,
      thank you very much for your reply.
      Just one last question:
      in my properties i have layout-mode = Use layout from named view
      and view = view1
      is it not possible to Access this property (property view) by script ?
      otherwise i could make a button 'Change View' and then set the property from view1 to view2.

      Thanks for your help
      Helmut

      Комментарий


      • #4
        Actually, you right! ) RequestList control have property "ViewName" - "The name of a (public) view that will be applied in order to display the objects in the RequestList Control.".
        Code like this works fine: ActiveXControl.Object.ViewName = "View 1"

        So you need to create ComboBox with names of views and set [your RequestList Control name].Object.ViewName when user select value.
        С уважением, Сергей Осадчий

        Комментарий


        • #5
          Hello,
          thanks for your answer.
          But it doesn't work.

          if i put the code on my Combobox it doesn't have any affect. The script sends no error and in Debugger it goes through the Statements. But the view doesn't Change.

          i tried and i can set the viewName in onOpen of the form - that works - it seems that i could only do it once as Long as the requestList is not displayed yet.

          Thanks for your help
          Helmut

          Комментарий


          • #6
            You need to update control contents after change view:
            Код:
            ActiveXControl.Object.ViewName = "View 1"
            ActiveXControl.Object.RedrawAll
            By the way, you also can find all form objects, properties and methods in Form programming documentation - C:\Program Files (x86)\OMNITRACKER\FormEdit.chm.

            Please not consider last note as cause not to ask questions! I just mean, it's not secret knowledge )
            С уважением, Сергей Осадчий

            Комментарий


            • #7
              Hello,
              thanks for your answer.
              I really do read documentation before posting - otherwise i would have posted about 1000 questions
              the Problem is that everything is documented, but it is hard to find.
              for my example: there is no hint in the documentation of the property ViewName, that you have to use redrawAll after changing it.
              the written hint is: Please note that this property only has effect if the LayoutMode Property is set to 3 (Use View Layout)

              but anyway - thanks very much for your help and your Patience with my questions
              and sorry but
              my Problem is still not solved. Even redrawAll has no effect.
              Последний раз редактировалось Helmut; 21-12-2015, 17:32.

              Комментарий


              • #8
                I've just now tested this in Enduser Client (10.5.0) and I confirm that RedrawAll method does not update view layout, as it does in Admin Client. I think, it's a reason to address in vendor support.
                С уважением, Сергей Осадчий

                Комментарий


                • #9
                  Hello,
                  answer from Support :
                  Then add an UpdateAllRequests(), because WPF uses "lazy evaluation" (due to performance reasons):
                  ActiveXControl.Object.UpdateAllRequests

                  tested, and it works

                  Комментарий


                  • #10
                    Сообщение от Helmut Посмотреть сообщение
                    Hello,
                    answer from Support :
                    Then add an UpdateAllRequests(), because WPF uses "lazy evaluation" (due to performance reasons):
                    ActiveXControl.Object.UpdateAllRequests

                    tested, and it works
                    Helmut, thanks!
                    С уважением, Сергей Осадчий

                    Комментарий

                    Обработка...
                    X