Announcement

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

    ListGrid Header/Cell alignment problem

    I am using SmartClient_v111p_2017-07-03_LGPL in IE11. When I create one particular grid the header and cell are not in alignment. Other ListGrids I have don’t have this problem. Could it be related to column names being strings of all numeric characters?

    Click image for larger version

Name:	ListGridHeaderAlignment.PNG
Views:	128
Size:	9.1 KB
ID:	248665


    Code:
            isc.ListGrid.create({
                ID: "_lgRole1",
                htmlElement: "divModRole1",
                width: 1140,
                height: 765,
                alternateRecordStyles: true,
                canEdit: true,
                canSort: false,
                showHeaderContextMenu: false,
                autoFetchData: false,
                editByCell: true,
                showRowNumbers: false,
                visibility: "shown",
                click: "LG_onClick(this)",
                canEditCell: function (rowNum, colNum) { return CellEdit_Iso(rowNum, colNum, this); },
                getCellCSSText: "CellStyle (this.ID, record, rowNum, colNum)"
            });
    I use setFields to the following:


    Code:
    [
     { name: "Subsystem"  , title: "Select All", width: 90, canEdit: false, type: "text"   , align: "center", prompt: "Select All Subsystems", changed: "CheckedStateChanged(this, 'Subsystem')" },
        { name: "SubsystemID", title: "Subsystem ID"         , canEdit: false, type: "text"   , hidden: true },
        { name: "751"   , title: "751"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS San Juan" },
        { name: "752"   , title: "752"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Pasadena" },
        { name: "753"   , title: "753"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Albany" },
        { name: "754"   , title: "754"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Topeka" },
        { name: "756"   , title: "756"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Scranton" },
        { name: "757"   , title: "757"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Alexandria" },
        { name: "758"   , title: "758"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Asheville" },
        { name: "759"   , title: "759"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Jefferson City" },
        { name: "760"   , title: "760"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Annapolis" },
        { name: "761"   , title: "761"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Springfield" },
        { name: "762"   , title: "762"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Columbus" },
        { name: "763"   , title: "763"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Santa Fe" },
        { name: "764"   , title: "764"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Boise" },
        { name: "765"   , title: "765"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS Montpelier" },
        { name: "785"   , title: "785"       , width: 60, canEdit: true , type: "boolean", align: "center", cellAlign: "center", changed: "SetFormAsDirty()", prompt: "USS John Warner" }
    ]
    I use setData to the following


    Code:
    [
     { Subsystem: "ARCI" , SubsystemID 52, 751: false, 752: false, 753: false, 754: false, 756: false, 757: false, 758: false, 759: false, 760: false, 761: false, 762: false, 763: false, 764: false, 765: false, 785: false }
     { Subsystem: "BLQ"  , SubsystemID 53, 751: false, 752: false, 753: false, 754: false, 756: false, 757: false, 758: false, 759: false, 760: false, 761: false, 762: false, 763: false, 764: false, 765: false, 785: false }
     { Subsystem: "BYG"  , SubsystemID 54, 751: false, 752: false, 753: false, 754: false, 756: false, 757: false, 758: false, 759: false, 760: false, 761: false, 762: false, 763: false, 764: false, 765: false, 785: false }
     { Subsystem: "ISIS" , SubsystemID 55, 751: false, 752: false, 753: false, 754: false, 756: false, 757: false, 758: false, 759: false, 760: false, 761: false, 762: false, 763: false, 764: false, 765: false, 785: false }
     { Subsystem: "RADAR", SubsystemID  3, 751: false, 752: false, 753: false, 754: false, 756: false, 757: false, 758: false, 759: false, 760: false, 761: false, 762: false, 763: false, 764: false, 765: false, 785: false }
    ]

    #2
    Which skin are you using? We tried with Enterprise and Tahoe, and we see no issues.

    The sample code wasn't runnable, for various reasons - also, visibility:"shown" isn't a thing - you probably don't want to set visibility at all, in this case, but if you did it would be visibility:"visible".

    Irrespective of those things, the first thing to do is to try with the latest build of 11.1 from smartclient.com/builds - if you still see issues, please tweak your code so it runs (bad htmlElement setting, function overrides calling missing functions and missing colons and commas in your data-set), and we can take a look.

    Comment


      #3
      Base on your reply, I was able to determine the cause of the problem. I have a conflicting CSS entry, unfortunately it is in my master page. Thanks for the help.

      Comment

      Working...
      X