Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #113613
    Damir Ugrin
    Participant

    Hi,

    I have smart grid with columns and datafields defined as:
    columns: [
    { label: ‘Vrsta’, dataField: ‘typedescr’, dataType: ‘string’, width: 100},
    { label: ‘Dokument’, dataField: ‘docnumber’, dataType: ‘string’, width: 150},
    { label: ‘Datum’, dataField: ‘docdate’, dataType: ‘datetime’, cellsFormat: ‘dd.MM.yyyy’, width: 150, template: TemplateDatetime },
    { label: ‘Status’, dataField: ‘status’, dataType: ‘string’, width: 75 },
    { label: ”, dataField: ‘filler’, width: 0, allowHide: false, allowSort: false } // Filler column – exclude from column chooser
    ],
    dataSourceSettings: {
    dataFields: [
    { name: ‘idrec’, type: ‘number’ },
    { name: ‘idreclink’, type: ‘number’ },
    { name: ‘type’, type: ‘string’ },
    { name: ‘typedescr’, type: ‘string’ },
    { name: ‘docnumber’, type: ‘string’ },
    { name: ‘docdate’, type: ‘string’ },
    { name: ‘status’, type: ‘string’ },
    { name: ‘modified’, type: ‘bool’ },
    { name: ‘new’, type: ‘bool’ }
    ],
    },

    When i want to get value of idrec, idreclink, type, modified or new fields using getRowData() grid method, I got all visible columns data but no hidden or not used fields in columns. How to solve this problem.

    • This topic was modified 2 weeks, 1 day ago by Damir Ugrin.
    #113614
    Damir Ugrin
    Participant

    Version of Smart Grid is “Smart UI v25.0.3 (2025-11-27)”.
    If I add idrec, … fields to columns then I can access its data with getRowData().
    How can I access all row data fields even if they are not part of visible columns.
    This was fully functional jqwidgets grid that I am trying to replace with smart ui grid.

    • This reply was modified 2 weeks, 1 day ago by Damir Ugrin.
    #113617
    Damir Ugrin
    Participant

    IN the meantime. I have discovered that when data is loaded with page (existed before grid is initialized) all is fine.
    Problem occurs when data is empty in the moment of grid init, like when you open new document form.

    #113618
    admin
    Keymaster

    Hi Damir,

    It does not matter whether the grid is initialized or not, it’s important to have the dataFields property of the dataSourceSettings object set and the columns to point to the data fields in the data fields collection. This way, the data will be readable and stored.

    Regards,
    Markov

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.