I am loading a really basic grid using DataGridPro and I need the top row to be selected and highlighted upon loading. I did not see a great example when I tried researching.
This is what my DataGridPro component looks like:
Here is what I have so far:
<DataGridPro
disableMultipleSelection={true}
columns={[
{
field: "startDate",
headerName: "Start Date",
description: "start.",
type: "date",
valueFormatter: ({ value }) => dateFormatter(value),
flex: 0.5,
},
{
field: "endDate",
headerName: "End Date",
description: "end.",
type: "date",
valueFormatter: ({ value }) => (value !== null ? dateFormatter(value) : null),
flex: 0.5,
},
]}
rows={data ? data : null}
></DataGridPro>
I'm not sure what to do since I can't find any examples in their demos or API documentation.
