Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Deactivate grid redrawing while scrolling it or resizing header

    Is it possible to set grid to don't redraw when scrolling it and resizing header? For example:
    In my case, I'm not using editing isomorphic's components, I'm detroying it and creating my owns (Example in screenshots). So, those components are returning when redrawing. Is there a way make it don't redraw ? here are 2 cases
    1 - in editing/including mode and scroll dowm/up
    2 - in editing/including mode and resizing header

    I'm uploading 3 screenshots, first is my grid, second is my grid with my own edit components and the last one is the grid in editing mode when i resize the header.
    Attached Files

    #2
    The grid needs to redraw to draw newly exposed (and possibly even newly loaded) data.

    This doesn’t need to redraw components you’ve added. It does not do so, for example, with components created by the recordComponents system - which by the way is probably what you should be using rather than attempting to duplicate this built-in feature.

    Comment


      #3
      Originally posted by Isomorphic View Post
      The grid needs to redraw to draw newly exposed (and possibly even newly loaded) data.

      This doesn’t need to redraw components you’ve added. It does not do so, for example, with components created by the recordComponents system - which by the way is probably what you should be using rather than attempting to duplicate this built-in feature.
      Ok, i didn't know about this method. I will take a look and try it, thanks for the answer

      Comment


        #4
        Originally posted by Isomorphic View Post
        The grid needs to redraw to draw newly exposed (and possibly even newly loaded) data.

        This doesn’t need to redraw components you’ve added. It does not do so, for example, with components created by the recordComponents system - which by the way is probably what you should be using rather than attempting to duplicate this built-in feature.
        Is there an example? i want to overwrite just input components in editing mode and not all of them, but i need it to be redrawed with the grid

        Comment


          #5
          You're probably looking for something like this:
          Custom editors in a grid: https://www.smartclient.com/smartgwt...custom_editors
          (Note that you can basically use any FormItem subclass, including a CanvasItem as a grid edit item).

          Alternatively, if you're looking to embed arbitrary custom widgets in a grid's cells, you'd want to use the recordComponents feature: https://www.smartclient.com/smartgwt...d_cell_widgets

          Comment


            #6
            Ok, so the second option is what i need, but this link only contains java source code, is there an javascript example using this feature available ??

            Comment


              #7
              Easy to find, see here and here.

              Best regards
              Blama

              Comment


                #8
                Originally posted by Blama View Post
                Easy to find, see here and here.

                Best regards
                Blama
                thanks, i searched for widget but didn't see this section

                Comment


                  #9
                  But there is something I still didn't understand. How is this method is called when entering in editing mode? i'm testing here and it's only being called in creation time.

                  Comment


                    #10
                    Other question, updateRecordComponent only updates components created by createRecordComponent but i want to update all the components, is there a way for that or ai must then create all of them by createComponentRecord ?

                    Comment


                      #11
                      When showRecordComponents is true, recordComponents are created automatically when the grid draws its rows.
                      (This feature is not restricted to edit mode - that's why we also shared the link to the sample demonstrating customization of edit items, and mentioned the option to use CanvasItems for more advanced customizations)
                      The recordComponent lifecycle is described in documentation here: https://www.smartclient.com/smartcli...cordComponents

                      As an aside - you requested the JavaScript rather than Java versions of the links - you're posting in the "SmartGWT Technical Q & A" forum (SmartGWT apps are written in Java), you probably wanted to post in the SmartClient forum instead (SmartClient apps are written in JavaScript).
                      (The documentation link above is to the SmartClient reference document and is JavaScript based)

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        As an aside - you requested the JavaScript rather than Java versions of the links - you're posting in the "SmartGWT Technical Q & A" forum (SmartGWT apps are written in Java), you probably wanted to post in the SmartClient forum instead (SmartClient apps are written in JavaScript).
                        (The documentation link above is to the SmartClient reference document and is JavaScript based)
                        Oh, sorry for posting in wrong section. Should I open a new post on the rigth section?

                        "When showRecordComponents is true, this method is called to update components created by createRecordComponent() when they are to be applied to a different record in the grid."
                        This is the description os updateRecordComponents(). Is there a way to update not only components create by createRecordComponent() but all the components??

                        Comment

                        Working...
                        X