I am a beginner to objective c.Please tell me that how perform multiplay selection in NSTableView.I am unable to retain previous selection, when i am clicking on another row.
You have to enable multiple selection on the table view by calling:
[tableView setAllowsMultipleSelection: YES]
You can then select multiple rows by pressing Command+Click on the rows you want.
The method call you are looking for is
- (void)selectRowIndexes:(NSIndexSet *)indexes byExtendingSelection:(BOOL)extend
I hope you would have got the answer, but the better way is, when you click the check box, you could select the row by using api selectRowIndex and once you want to process, you could get all the selectedItemindexes,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With