What is the event to handle row select in Kendo - kendo-grid

I have a Kendo Grid in which I want to add an event handler for row select. In the Telerik Grid, the code is
ClientEvents(events => events.OnRowSelect(""))
However, I can not find OnRowSelect in Events in Kendo. How to do it? Thanks.

I believe you still have to respond to the change event. See the Telerik help for the Grid event change:
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-change

Related

trigger itemSelect event on Primefaces autocomplete

I have a primefaces autocomplete element which works great except one thig. The problem is that when I enter a valid text (which is mappable to the data behind) but I don't select the element from the propositions, and don't press tab or enter, nothing happens.
So I enter a value and click into another field, the element is not selected and the validation fails. However, I don't want the user to force to explicitly select an item.
My ideas were, that i put an onchange listener to the input element and trigger the primefaces itemSelect event within. But I don't know how to do that, if it's even possible.
Or maybe there are other solutions?
Thanks in advance!
I found a way, although it might not be the most beautiful and easy one.
Maybe it helps somebody...
This is a specific solution for primefaces (5.3), but it should work for other versions too.
$('#form\\:txtAutoComplete_input').val('Foo');
$('#form\\:txtAutoComplete_input').trigger('keydown');
$('#form\\:txtAutoComplete_input').trigger('input');
$('#form\\:txtAutoComplete_panel .ui-autocomplete-item').trigger('click');
For some reason, after the value is entered into the input field, you have to trigger the keydown and the input event in that order. After these events the autocomplete list shows with the matching values. There you have to trigger click on a certain element, so all the backing bean stuff is properly executed.
There is an API for Primefaces widgets.
For instance ;
<p:autoComplete id="gtautoaomplet" value="#{item.soemprop}" completeMethod="#{bean_CrossCheckNew.completeText}" scrollHeight="250"/>
In JS code ;
widget_form_mapingGrid_0_gtautoaomplet.search('foo');
When you write "PrimeFaces.widgets" in your browser console you can see all the widgets available in your page.
For more datail :
https://primefaces.github.io/primefaces/jsdocs/index.html
Good luck.

Removing items on click based on checkbox status using angularjs

I am using this Plunkr. It displays a list of products. When I click on remove button, the items which are checked should be removed from the list.
<button ng-click="onClick()" class="k-button">Remove</button>
I have tried various things however, nothing is working. I am not exactly getting what logic should go in the following logic
$scope.onClick = function () {
}
I know it is something very simple however, I am not able to get it. Any help would be appreciated.
If you ask about logic, i will try to explain it here..
First inside onClick function get your gird's datasource variable, then find all selected checkboxes and use jquery each to iterate over each checkbox and find closest data-uid attribute. Every grid row has uid in its DOM, with this uid value get kendo observable object from datasource with getByUid method.
Last using datasource pass this observable object to remove method of datasource.
This is Kendo datasource API, hopes it helps you to write the code..

Kendo UI MVC Grid in batch update display confirmation dialog on cancel changes

I have a Kendo UI Grid set to update the database in batch update mode with InCell editing. Everything works as it should. When the user clicks on the 'Cancel changes' button the cancelChanges method is called and the current changes are discarded (as they should).
I would like to display a confirmation dialog before actually discarding the changes. I want to prevent an accidental click on this button from cancelling all changes.
I looked at the DateSource object but I did not see any event I can handle to achieve this.
Does anyone have an idea on how to handle this situation?
Your help is most appreciated.
Daniel.
Daniel,
IIRC, kendo grid uses a class 'k-grid-cancel' for its grid updates. If you wish to offer the user a confirmation, you may need to include a jquery event for the kendo cancel button:
$(".k-grid-cancel").click(function(e) { return confirm('Are you sure?'); });
I hope this helps you. Good luck.

Listbox events in HTML

I want to call 'onclick' event on listbox. There is 'onchange' event which is called whenever the displayed options changes but I want to call a function when the list box is selected or the displayed option is selected again. Any help is appreciated.
I think by using HTML listbox you cant find Click event. It is Having only change event.Refer This
But You can Do it by some other way Using JavaScript. I found one interesting link Refer This
good Luck.

What is the event to know focus out from a datagrid cell (column) without using itemRenderer or itemEditor

I am using a editable datagrid and want to autosave the edited information in an editable column. Also, since its a simple text editing I don't want to use itemEditor/Component for the same. I was hoping to have a focusOut event but I dont see any focusOut event for datagrid column(even if its editable?). What event should I be using?
Thanks.
I got it working by using itemRenderer in which I used a text box and handled it with textbox's focusOut property. Still wondering how could I have done it directly from dataGrid's event.