Announcement

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

    Grid Summary behaving strangely

    This is related to the example in this thread, http://forums.smartclient.com/showthread.php?t=24769

    SmartGWT 3.1, GWT 2.5.0, FF 17.0.1

    The summary for 'accuracy' column shows the correct value when it first drawn, which is basically a SUM function. Whenever I click a checkbox within the grid, the summary function got triggered again, which is what I expected and wanted. But the issue here is that all the records passed into the getSummaryValue() method got the value of the checked row. For example, if you check the row with Accuracy=1, the summary becomes 6. For Accuracy=2, summary=12...etc.

    Sorting the grid reset the summary to the correct value. Can you please take a look of the attached sources.
    Attached Files

    #2
    Hi, any update on this?

    Comment


      #3
      We're reproducing it and it's under investigation. We'll keep you posted as soon as we have more info.

      Regards
      Isomorphic Software

      Comment


        #4
        Ah - it turned out there was a bug in the sample code. The DataSource has no specified primary key field. You have a field called "primaryKey" but it has not been set as the primary key field for the dataSource.
        The lack of primary keys confuses the editing subsystem (used by canToggle) - making it unable to determine which edit values should be associated with which underlying record in the data array. This caused the somewhat bizarre behavior exhibited by this sample.

        You can fix this by calling primaryKeyField.setPrimaryKey(true); within the sample

        Regards
        Isomorphic Software

        Comment


          #5
          The suggestion works! Thanks for the investigation.

          Comment


            #6
            Mouse Error

            I recently began seeing this error. I'm not sure if this is the correct location in the forum to post it.

            The error is:

            10:05:53.336 [ERROR] [builtinds] 10:05:53.331:MDN4:WARN:Log:EventHandler.determineEventKeyName(): Unable to determine key for 'mousedown' event. Returning null

            com.smartgwt.client.core.JsObject$SGWT_WARN: 10:05:53.331:MDN4:WARN:Log:EventHandler.determineEventKeyName(): Unable to determine key for 'mousedown' event. Returning null
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
            at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
            at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
            at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
            at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
            at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
            at java.lang.Thread.run(Unknown Source)



            Anyone know how I can fix this problem? Any help would be greatly appreciated.

            -- Jeff

            Comment

            Working...
            X