Announcement

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

  • ListGrid quirk after upgrade, blank section in grid above added record

    Hi Isomorphic,

    After upgrading from "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)" to "v12.0p_2018-08-28/Pro Deployment (built 2018-08-28)" we are seeing a quirk in our List Grid after doing a Add operation.

    The grid above the newly added record remains blank, until you select some other record in the ListGrid, as shown below in the image. On occasion we may not see the blank space, but it appears to happen most of the time.

    image1

    Click image for larger version  Name:	blank_image_1.png Views:	1 Size:	21.5 KB ID:	254811

    image2

    Click image for larger version  Name:	blank_image2.png Views:	1 Size:	50.6 KB ID:	254814

    We are essentially doing the two main operations after the Add operation completes.

    scrollToRow(selRowNum);
    selectSingleRecord(selRowNum);

    If we comment out the call to scrollToRow(selRowNum), the blank space appears to go away.

    Are you aware of any known issues here?

    Any help would be appreciated.

    Thank you
    Last edited by stonebranch2; 31st Aug 2018, 11:29.

  • #2
    We're not reproducing this on our end with some simple test cases.
    The screenshots give us an idea of what the bad state you're in is (the grid has essentially scrolled to a position where you can see the spacers used to facilitate incremental rendering of listGrid rows), but not how to get there. Obviously - this should not be happening, and when we attempt to programmatically scroll an undrawn row into view using the scrollToRow() method things behave as they should.

    Can you try to create a standalone test case which demonstrates the problem? With luck this should be as simple as an EntryPoint class containing a ListGrid with a dataSource (one of the datasources shipped with our samples such as SupplyItem or Animals may suffice), and the necessary code to do exactly what you're doing in your app (add a record, scroll to a specific position and select a record).

    Thanks
    Isomorphic Software

    Comment


    • #3
      Hi Isomorphic,
      We will work on extracting out a test case to reproduce. Will update as soon as we do.
      Thanks

      Comment


      • #4
        Hi Isomorphic,

        We've been able to reproduce this issue by modifying the following SmartGWT Showcase example.

        https://www.smartclient.com/smartgwt...operations_add

        The problem appears when the ListGrid has the following property enabled.

        Code:
        countryGrid.setAutoFitFieldWidths(Boolean.TRUE);
        NOTE: We also set the fetch mode for the list grid to LOCAL since this problem only occurs if the list grid has a complete client-side cache.

        You should be able to see the problem after adding a few countries.

        Code:
        public void onModuleLoad() {
                VLayout layout = new VLayout();
                layout.setWidth100();
                layout.setHeight100();
        
                final ListGrid countryGrid = new ListGrid();
                countryGrid.setWidth(500);
                countryGrid.setHeight(224);
                countryGrid.setEmptyCellValue("-");
                countryGrid.setDataSource(WorldXmlDS.getInstance());
        
                ListGridField countryCodeField = new ListGridField("countryCode", "Country Code");
                ListGridField nameField = new ListGridField("countryName", "Country");
                ListGridField capitalField = new ListGridField("capital", "Capital");
                ListGridField continentField = new ListGridField("continent", "Continent");
                countryGrid.setFields(countryCodeField, nameField, capitalField, continentField);
        
                countryGrid.setAutoFitFieldWidths(Boolean.TRUE);
                countryGrid.setSortField(0);
                countryGrid.setDataFetchMode(FetchMode.LOCAL);
                countryGrid.setAutoFetchData(true);
        
                IButton addCountry = new IButton("Add new country");
                addCountry.addClickHandler(new ClickHandler() {
                    public void onClick(ClickEvent event) {
                        ListGridRecord rec = new ListGridRecord();
                        int number = getNextNumber();
                        rec.setAttribute("countryCode", "A" + number);
                        rec.setAttribute("countryName", "Country " + number);
                        rec.setAttribute("capital", "Capital " + number);
                        countryGrid.addData(rec, new DSCallback() {
        
                            @Override
                            public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) {
                                Record[] recordArray = dsResponse.getData();
                                if (recordArray != null && recordArray.length == 1) {
                                    Record record = recordArray[0];
                                    if (record != null) {
                                        int index = countryGrid.getRecordIndex(record);
                                        if (index < 0) {
                                            SC.say("Record not found.");
                                        } else {
                                            countryGrid.scrollToRow(index);
                                            countryGrid.selectSingleRecord(index);
                                        }
                                    }
                                }
                            }
                        });
                    }
                });
                addCountry.setLeft(0);
                addCountry.setTop(240);
                addCountry.setWidth(140);
        
                layout.addChild(countryGrid);
                layout.addChild(addCountry);
        
                layout.draw();
            }
        Thanks.

        Comment


        • #5
          Hi Isomorphic,

          Were you able to reproduce the issue with the provided stand-alone test case?

          Thanks

          Comment


          • #6
            Hi
            Yes, we are reproducing the issue and have a developer working on it. We'll follow up when we have a solution for you

            Regards
            Isomorphic Software

            Comment


            • #7
              This issue should be resolved in nightly builds starting today (Sep 19 2018)
              Please let us know if it persists for you

              Regards
              Isomorphic Software

              Comment


              • #8
                Hi Isomorphic,

                We were looking to give the issue resolution a try, however, were were unable to find an appropriate patch build yet.

                Do you know when we can expect a patch build to be available for v12.0.

                Thank you

                Comment


                • #9
                  Yes - it looks like we've had a couple of nightly build failures. We are looking at these and anticipate normal builds should resume soon (likely either today or tomorrow).

                  Comment

                  Working...
                  X