I have a TypedDataTable called CamerasDT which has a composite Primary Key of GroupId and CameraId. I want to use TypedDataTable.Rows.Find(key as object) to return a specific row by GroupId and CameraId. I don’t seem to be able to find a way to send primary key to the find function. Any help is appreciated.
I have a TypedDataTable called CamerasDT which has a composite Primary Key of GroupId
Share
Use the one of the overloads for the Find method to pass an array of Objects that corresponds to the primary key values you’re searching for.
Example from the MSDN article I linked:
In your case you’d pass an Object array with values to search for in your GroupId and CameraId fields.