dataTable Selectable Events - ajax

I have a data table set up such that selectionMode="multiple"and I wind up with a column for checkboxes. I have 2 ajax events keying off of rowSelectCheckbox and rowUnselectCheckbox that fire off whenever any of the checkboxes are toggled on or off. My problem is that these ajax events are not firing off for the unique checkbox in the header that selects/unselects all other checkboxes in mass. Is there a way I can disable this checkbox or is there a different event I can tell ajax to look for?

Related

Kendo grid. Event when selection is become empty

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)

Trigger validation and redraw on different component via ajax

I have a wicket page with a couple of TextFields that have different kind of validators. So far, validation is triggered via Ajax on the onChange event.
I also have a checkbox that defines which set of validation rules should be used for the TextFields.
If I click the checkbox and then input data into the TextFields, validation works just fine. But how do I handle the fact that already entered and validated data can suddenly become invalid if the checkbox is clicked afterwards? How do I trigger the validation and the redraw (to show the error notification) of the TextFields from within an AjaxEvent from the checkbox?
I tried to call myTextField.validate() but that didn't trigger any of my validators.
Since your validation is based on multiple components you should implement IFormValidator. Pass both checkbox and textfield in getDependentFormComponents() and change of either will trigger it.
Also if you are using checkbox to refresh some elements make sure to use AjaxCheckbox, that has onUpdate(AjaxRequestTarget) method.
You could attach an AjaxFormSubmitBehavior in the checkbox. This would submit the form and trigger validation each time the checkbox value is toggled.

Kendo UI MVC bind Grid to DataSource from MultiSelect widgets

We are using Kendo UI MVC and need to filter a large number of records and display them in a read-only DataGrid. The page has MultiSelect widgets that each let the user select from a list of distinct values for a specific database column. After the user has entered his selections in the MultiSelect widgets he will click a 'refresh' button to update the grid. The Grid's DataSource.Ajax.Read method should pass the user's selections to the server and display the results in the Grid.
I know how to populate the MultiSelect widgets and how to return data from the server via Ajax but I'm unclear on how to pass the user's selections to Grid.DataSource.Read().
What is the best way for the button to pass the user's selections to the DataSource, fire the Read method, and display the results in the Grid?
EDIT: Putting the widgets inside the Grid's ToolBar will meet our needs.
Embed the widgets in Grid.Toolbar.Template

RadGrid how to disable Row Click in some Cells? asp.net

This question might be a bit specific since it invovles a specific type of grid called RadGrid from Telerik.
I have a RadGrid with 5 columns with the EnablePostBackOnRowClick set to true, but I only want the RowClick event to be executed on 3 grid cells, I don't want this event to be executed on the fisrt and last cell (column), is there anyway to disable the RowClick event from being triggered when you click on these particular cells? Is there a way to limit the RowClick event to just the 3 cells/columns in the middle?
Take a look at this Telerik demo: Grid Cell Selection
If you specify an OnCellSelected client method, you could check which column the cell belongs to, then send an AJAX request back to the server (if if it's one of your 3 columns) and put your remaining logic in the server-side AJAX request handler method. I'm not sure if the server-side ItemCommand method can detect which cell you clicked on, but try that first, and if it doesn't work then the AJAX route would suffice. Also, you need at least the 2012 build of RadControls.
This is the markup for setting the appropriate settings:
<ClientSettings>
<ClientEvents OnCellSelected="cellSelected"></ClientEvents>
<Selecting CellSelectionMode="SingleColumn"></Selecting>
</ClientSettings>

in a jqgrid editform, i need to restrict checkbox selection to only one at a time

i have a jqgrid editform with three checkboxes. I need the checkboxes to function like typical html Radio buttons that let a user select ONLY ONE of a limited number of choices.
Unfortunately, jqgrid does not offer radio button editypes.
I know that i can setup an event to deselect all other checkboxes in the editform. Is this the only way to do it in jqgrid?
You can bind the click event to any from the checkboxes and in the event handler to uncheck all other chechboxes in the form if the current checkbox will be checked.

Resources