JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid with batch:true how can access to data.fields in news rows

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #101452
    chips
    Member

    Hi,
    with  the property batch:true
    how can access to data.fields in news rows?
    the function getBatchEditChanges() return this:
    <span class=”name-and-value”><span class=”name”>added</span>:[</span>
    <span class=”name-and-value”> <span class=”object-value-object value”><span class=”object-properties-preview”>{<span class=”name”>id</span>: <span class=”object-value-undefined”>undefined</span>, <span class=”name”>data</span>: <span class=”object-value-string”>”54908271-03c9-a70c-8a21-e32e9d4f62b7″</span>},</span></span></span><span class=”name-and-value”> <span class=”object-value-object value”><span class=”object-properties-preview”>{<span class=”name”>id</span>: <span class=”object-value-undefined”>undefined</span>, <span class=”name”>data</span>: <span class=”object-value-string”>”0cc156df-4da0-c7af-4adf-2ca40c21ea74″</span>},..</span></span></span>
    ]
    <span class=”name-and-value”><span class=”name”>deleted</span>: <span class=”object-value-array value”><span class=”object-properties-preview”>[]</span></span></span>
    <span class=”name-and-value”><span class=”name”>updated</span>: <span class=”object-value-array value”><span class=”object-description”>(3) </span><span class=”object-properties-preview”>[<span class=”object-value-object”>{…}</span>, <span class=”object-value-object”>{…},…</span></span></span></span>
     

    #101455
    chips
    Member

    Sorry , the above message. 🙁
    Hi,
    with the property batch:true
    how can access to data.fields in news rows?
    the function getBatchEditChanges() return this:
    {
    added:[{id:undefined,data:”54908271-03c9-a70c-8a21-e32e9d4f62b7″},
    {id:undefined,data:”0cc156df-4da0-c7af-4adf-2ca40c21ea74″},
    ..
    ],
    deleted:[],
    updated:[{…},{…},..]
    }
    how can you read the values of the fields in data object?

    #101456
    admin
    Keymaster

    Hi chips,
    If there are updates in cell values, they will be stored in the ‘updated’ array. It contains all changed cells information. Each value in that array is a cell object with id, dataField, oldValue and newValue properties.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101462
    chips
    Member

    Hi admin,
    the updated array is fine.
    My Issue is about added array returned by getBatchEditChanges() :
    {
    added:[{id:undefined,data:”54908271-03c9-a70c-8a21-e32e9d4f62b7″},
    {id:undefined,data:”0cc156df-4da0-c7af-4adf-2ca40c21ea74″},
    ..
    ],
    deleted:[],
    updated:[{…},{…},..]
    added array have object {id:undefined,data:”54908271-03c9-a70c-8a21-e32e9d4f62b7″} .
    I would like to know how to access the content of eg: data:”54908271-03c9-a70c-8a21-e32e9d4f62b7″  since as the added row is not yet saved it cannot be accessed by grid.rows
    Best Regards
     

    #101463
    admin
    Keymaster

    Hi chips,
    This is an empty row as far as I see. It does not have id or any data added to it. When you edit it, it will have different values.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

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