Announcement

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

    Disappearing heading of editable list grid with datasource

    I´m having an issue with an editable list grid with a datasource in 7.0 RC2. The grid works well loading, paging editing and saving except one issue: When the editing of a cell starts, the heading (See screenshot) of the grid disappears. What am I doing wrong?

    Listgrid source :
    Code:
          ...
          isc.ListGrid.create(
           {
            "ID":"translationsListGrid_13",
            "selectionType":"single",
            "canEdit":true,
            "editEvent":"click",
            "timeFormatter":"toShortTime",
            "sortField":"translationIdGridField",
            "sortDirection":"ascending",
            dataSource:isc.DataSource.create(
             {
              "fields":
              [
               {
                "ID":"generatedIndex_13",
                "name":"generatedIndex",
                "primaryKey":true,
                "hidden":true,
                "canSort":false,
                "valueMap":
                {
                }
               },
               {
                "ID":"translationIdGridField_13",
                "name":"translationIdGridField",
                "title":"TranslationId",
                "type":"text",
                "canEdit":false,
                "canSort":true
               },
               {
                "ID":"translationGridField_13",
                "name":"translationGridField",
                "title":"TranslationValue",
                "type":"text",
                "canSort":false
               },
               {
                "ID":"translationTimeStampGridField_13",
                "name":"translationTimeStampGridField",
                "title":"TimeStamp",
                "type":"text",
                "canEdit":false,
                "canSort":false,
                "filterEditorType":"DateItem"
               },
               {
                "ID":"translationUserGridField_13",
                "name":"translationUserGridField",
                "title":"TranslationUser",
                "type":"text",
                "canEdit":false,
                "canSort":false
               }
              ],
              "dataFormat":"json",
              "dataURL":"ScListGridTransport?viewNumber=13&id=translationsListGrid",
              "transformRequest":clwTransformRequest,
              "transformResponse":clwTransformResponse,
              "recordXPath":"/resultData"
             }
             ),
            "autoFetchData":true
           }
           )
          ...
    Datasource JSON Code
    Code:
    {
     "totalRows":3,
     "resultData":
     [
      {
       "translationIdGridField":"LabelEndDate",
       "translationTimeStampGridField":"11/12/2010 11:31:17",
       "translationGridField":"End date",
       "generatedIndex":"1",
       "translationUserGridField":"THO"
      },
      {
       "translationIdGridField":"LabelStartTime",
       "translationTimeStampGridField":"11/12/2010 11:33:19",
       "translationGridField":"Start time",
       "generatedIndex":"2",
       "translationUserGridField":"THO"
      },
      {
       "translationIdGridField":"Translations",
       "translationTimeStampGridField":"11/12/2010 11:32:03",
       "translationGridField":"Translations",
       "generatedIndex":"3",
       "translationUserGridField":"THO"
      }
     ]
    }
    Attached Files

    #2
    No way to tell just from that code. Use the Developer Console: use the Watch Tab to figure out if the components involved in the header are gone (maybe you destroyed them inadvertently), hidden, no longer drawn, or perhaps offscreen. You can also use the "clears" and "destroys" logs categories to try to identify how the component was destroyed if that turns out to be the state.

    Comment


      #3
      Thank you, that was a good hint. The log showed that the ID of the grid field collided with the ID of the editor. I named the ID in the grid field’s editorProperties and it works now!

      Now I´m stuck in another issue. I would like to add a filter for this grid. And I enabled it with "showFilterEditor":true.

      But when pressing the filter button on the right nothing happens. I´m not sure I understand the filter mechanism correctly, but I was expecting to get a XHR fetch call to my JSON datasource with the entered filter data.

      How can I configure the grid to do this?

      Regards Thomas

      Comment


        #4
        Your expectation is correct and you can see in samples that that's what happens with showFilterEditor:true - a fetch is sent to the DataSource. So try to figure out where this is going wrong - no call at all, JS error, or DataSource that doesn't work with fetch.

        Comment

        Working...
        X