View based NSTableView: how to get the clicked row index? - cocoa

When right clicking on a cell view in a view based table view with an assigned menu the cell's row gets a blue outline and the context menu appears. How do I get the index of that row? The property clickedRow only works for cell based table views.
Note: my question is significantly different in that I need a solution for menu updates es explained previously:
I need the clicked row in the menuNeedsUpdate function when creating the new menu.

It appears that clickedRow indeed also works for view based table views, but it's not yet set in menuNeedsUpdate. So it cannot be used to adjust the items in the menu (e.g. show specific items only that apply to the clicked row). However, you can use the menu validation to enable/disable entries (there the clicked row value is set finally).

Related

Oracle ADF : Select Check box at row level giving issue while selecting in panel tabbed

I am referring to this blog.
http://andrejusb.blogspot.in/2010/05/yes-no-check-box-in-query-criteria.html
however my requirement is different. I have multiple tabs where multiple tables are present. In each table row I need a column attribute is_active in checkbox format. So basically I want to store active or non active setup lines through panel tabbed screens.
With above blog approach first tab is working fine for checkboxes, but the second , third and other tabs are having below issues in check box.
When selected one checkbox, let's say it is checked, other checkboxes in all rows gets checked.
I checked the binding it is bind to it's respective attributes and VO iterators in pagedefinition, I chceked the code for model and view layer for working and non working tab.
Above issue is solved when created a transient attribute with control type checkbox, that transient attribute will be contolling the is_active value.

Kendo Hierarchy Grid clear selection

I am playing with this example by Kendo: http://dojo.telerik.com/EneFe
I have modified it so that the rows are selectable (selectable:true).
I have added a button on the top which calls the grid.clearSelection() function.
This is supposed to clear all selection but it does not clear the selection of rows that are selected in the dropdown table. (Recreate: click on the first row "Nancy", expand it and click on "10258 - Austria", then click the "Clear Selection" button and only "Nancy" will clear)
Is the function not working properly or am I misusing it?
In any case - how can I achieve a total clearing of all selected rows?
This is because they are two separate grids. Check this:
http://dojo.telerik.com/EneFe/2

jqgrid: using setselection as if the user clicked on the row?

I have a grid (master/detail) with keys bound. I'd like to have the first row in the master grid automatically selected when the page starts.
I used setSelection in the GridComplete event and can get the row selected. However, the up/down arrows (and the detail grid) do not function until the user actually clicks on a row with the mouse.
Does anyone have any ideas about how to get a row selected programatically so that the grid operates as if the user had clicked the row?
Thanks,
-Bill
The problem is that the grid does not have focus, so keyboard commands are not routed to it when the grid is initially displayed. You can work around this by explicitly calling focus after setting your initial selection:
jQuery("#myGrid").setSelection(myID).focus();

Slickgrid 2.1 - Apply and Remove Formatters On The Fly (i.e., Depending on Runtime Conditions)

I'm using slickgrid 2.1 and successfully using a formatter for one of my columns in order to display a button that, when clicked, deletes the corresponding row from the grid.
My requirements and question: I need to only display this button in the row the user single-clicks on. When the user clicks one row, then another, the button from the first selected row needs to be hidden and the button on the second selected row needs to be displayed. How can I programmatically do this?
Many thanks.

Is it possible to have a button in each row of a table view in Xcode?

I have a table view loaded with 3 pieces of data in each row, formatted using a Table View Cell in IB. I would like to "hide" one piece of data with a button, that when pushed, will then be hidden so that the data that is behind the button will then be displayed.
Does anyone know if this is possible? I put my button in the Table View Cell, but I can't figure out how to get it set to the proper class in the File Owner.

Resources