In Addition to the data that I'm getting I want show the Serial Number in 1st Column ? Is this possible ?
Hi @Prasad-YS,
I can do this for next releases.
@Prasad-YS
You do this with current version. We already have an tableData.id field on every row of data. Just add a new column like this: columns: { title: '#', field: 'tableData.id' }
title: '#', field: 'tableData.id'
Sorry, Didn't get any number, just got a blank column
Which version of material-table do you use?
I'm using 1.13.0
Can you share your material-table usage code
Updated to new version, Got the serial number now, Thanks lot for your support
Is it possible to make the tableData.id start from 1 instead of 0?
@mbrn Is it possible to make the tableData.id start from 1 instead of 0??
@ahsan-baloch just do tableData.id + 1
@ahsan-baloch
{ title: '#', field: 'tableData.id',
render:rowData => {
return(
<p>{rowData.tableData.id+1}</p>
)
}
}
@ahsan-baloch
{ title: '#', field: 'tableData.id', render:rowData => { return( <p>{rowData.tableData.id+1}</p> ) } }
but with thet when exported to pdf or csv the count shows from 0 not 1
@ahsan-baloch just do tableData.id + 1
render: (rowData) => rowData.tableData.id + 1
this worked for me but still when exporting it into csv or pdf count starts from 0 not 1
@ahsan-baloch you could first customize the data before it begins writing to CSV. you'll have to look around for that unfortunately coz i used another package as I didn't know material table supported exporting to CSV.
@ahsan-baloch you could first customize the data before it begins writing to CSV. you'll have to look around for that unfortunately coz i used another package as I didn't know material table supported exporting to CSV.
ahh okay thanks for the help