Hey - Pretty simple question, but not sure what is the quickest way to do this. I'm just looking to get the value of a column in the selected row of the UIGridView in C# Monotouch.
Any sample snippets would be great, I'm currently using the IGGridViewDataSourceHelper to easily populate data in the GridView. I have a selected row containing 3 columns I want to get the selected value of column 1 in the GridView.
Hi!
Sure, thats no problem. To retrieve the selected row, you'll use the SelectedRowPath() method on the IGGridView, and then use the ResolveDataValueForCell() method on the IGGridViewDataSourceHelper.
So it will look like this:
Basically, we're asking for the path of the selected row.
Then we're taking that path, and asking the DataSourceHelper to look up a specific value by creating a cell path. Note the when we create the IGCellPath, we're passing in zero as the last parameter. That's b/c we want the first column.
Hope this helps,
-SteveZ