Hi,
I am trying to get the datakey value of a row when expanding it to display a nestedViewTemplate.
When the grid is initially populated, I get the datakey values fine within the ItemCreated event.
But when the expand icon is clicked that code throws an error - {"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"}
Any thoughts on what I am doing wrong here? Thanks.
I am trying to get the datakey value of a row when expanding it to display a nestedViewTemplate.
When the grid is initially populated, I get the datakey values fine within the ItemCreated event.
Dim myID = CInt(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("whatever"))
But when the expand icon is clicked that code throws an error - {"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"}
Any thoughts on what I am doing wrong here? Thanks.