api.getRow(id)
Description
Gets an object with the row configurationUsage
api.getRow(id): object;
Parameters
id
- the id of a row
Returns
The method returns an object with the row parameters:
{
[key: string]: any;
}
Example
The example below shows how to output the row configuration to the console:
import { getData } from "./common/data";
import { Grid } from "wx-react-grid";
const { data, columns } = getData();
export default function App() {
const api = useRef(null);
React.useEffect(() => {
if (api.current) {
const row = api.current.getRow(11);
console.log("Row:", row);
}
}, [api]);
return <Grid data={data} columns={columns} api={api} />;
}
Related articles: