Yes, is it possible to have:
it would be great if i can get any reference code to implement the same.
i did it with following way,
In Coloumn 1 select the DataCell and assign it of type NSPopupButtonCell, by default it wouldn't come, you need to select it explicitly.
In the Code add following lines of Code...
NSTableColumn *option = [pTableColumns objectAtIndex:[pTableView columnWithIdentifier:OPTION_COLUMN_NAME]];
NSTableColumn *shortCutItem = [pTableColumns objectAtIndex:[pTableView columnWithIdentifier:SHORTCUT_COLUMN_NAME]];
// we want first cell to have the Image & Menu
//Data type column drop down
NSPopUpButtonCell *dataTypeDropDownCell = [option dataCell];//[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:YES];
[dataTypeDropDownCell setBordered:NO];
[dataTypeDropDownCell setEditable:YES];
NSArray *dataTypeNames = [NSArray arrayWithObjects:@"NULLOrignal", @"String", @"Money", @"Date", @"Int", nil];
[dataTypeDropDownCell addItemsWithTitles:dataTypeNames];
Add following code to set the correct MenuItem
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex{
if([[aTableColumn identifier] isEqualToString:OPTION_COLUMN_NAME]){
NSPopUpButtonCell *dataTypeDropDownCell = [aTableColumn dataCell];
[dataTypeDropDownCell selectItem:[ dataTypeDropDownCell itemAtIndex:3]];
}
}
Now only pending this is to append Image inside MenuItem which is not a big deal at all,
Again thanks for Looking at this, let me know if any other approach is there to do so....