简体   繁体   中英

Get the row data using javascript in devextreme grid

I am using devextreme dxdatagrid tables. in that case if I am clicking to a row in OnEditorPreparing event to retrieve the data on that row.

     function editorPreparing(e) {
         console.log(e.row);
        }

when I clicked the row and use e.row, I can easily get what is the value in the row. 在此处输入图片说明

However when using

       console.log(e.row.data);

I get an error such 在此处输入图片说明

Is there any way to retrieve the row values.

I am not sure why you use onEditorPreparing event to get the row data, I would use onRowClick instead, you can see it in the example below:

onRowClick: function (e) {
            console.log(e.data);
        }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM