Currently, there is a following signature of function "rowRender" passed to React Grid:
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
I managed to access something which I assume represents this index somehow by using "row._owner.index" although I'm not completely sure if that is always identical to the index of the row being rendered.
It would be very helpful if an index of a rendered row could be accessed as follows:
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps, index: number) => React.ReactNode;
Hi Agnieszka,
The current implementation of the rowRender passes GridRowProps where you have access to the dataIndex and the ariaRowIndex:
The ariaRowIndex represents the row index within the context of the entire Grid (the index of the TR element, including the TR elements in the header), where the dataIndex returns the index of the data item.
Best Regards,
Konstantin Dikov
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.