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
Related
I need some event when my Kendo grid lose selection (no row selected).
https://dojo.telerik.com/#nick_kingston/IjIYOduw
Select one or more rows.
Filter by some field that so no selected rows show.
Expecting event appearance because now no row selected.
How to implement item 3?
There is no event like lostSelection. The change-event triggers if the user changes the selection only.
Once the filter was executed, the dataBound-event is triggered (as you can see on the demo page https://demos.telerik.com/kendo-ui/grid/events). There you could check for the list of selected items with the method select (https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/select)
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).
I have a RadGrid with AllowMultiRowSelection="true", EnablePostBackOnRowClick="false", and UseClientSelectColumnOnly="false". The documented behavior is:
When multi-row selection is enabled, clicking on a row still de-selects any other selected rows. Users can select multiple rows by holding the Ctrl key down while clicking on a row.
However, the behavior for the "Client Select Column" (i.e. a checkbox column) is to toggle the row when the checkbox is clicked.
I want to apply the checkbox behavior (toggling) to any click on the row. I know this isn't the intended behavior of the grid, but it ought to be possible through some client-side scripting (i.e. click the row and it toggles the appropriate checkbox). Can anyone help me figure out such a script?
To avoid deselection of any other selected rows by click on the specific row you can just set UseClientSelectColumnOnly="True". As result you can toggle checkbox only by click on the checkbox.
It doesn't help you with click on the row, but it helps to avoid unexpected deselection.
I need to show/hide some of the slickgrid columns on the click of a button. Is it possible?
For example , I have a slickgrid having 3 columns. On click of a button I want to show three more columns i.e 4,5,6. On clicking the button again these columns should hide and another div should take its place. So basically toggle 3 of the 6 slickgrid columns.
Thanks
SlickGrid doesn't have a concept of showing or hiding columns. It shows whatever columns you specify in the constructor or in a later call to grid.setColumns(). If you want to hide a column, just remove it from the columns array you call grid.setColumns() again.
You can keep the original columns array with all the columns in a separate variable.
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();