Previous and Next - DataTables - datatable

I am using DataTables, I would like to send the pagination, but remove the previous and the next, is this possible? If yes like.

Removing the next and previous buttons is done by adding this option to your datatable:
"bPaginate": false

Related

How to detach and rebind kendo dropdown for cascading?

I tried to set the cascadeFrom option like this: $("#itemQty").data("kendoDropDownList").setOptions({ cascadeFrom: "category" });
setOptions() is woking for other options like template but not for cascadeFrom. Anything else that i need to perform except refresh(). See the example at jsfiddle.net. Here I tried to bind the third kendo dropdown with the first one.
It seems that
$("#itemQty").data("kendoDropDownList")._cascade();
works as you want after you set cascadeFrom by setOptions() method. However it's private method and can stop working in futher versions of Kendo.
Updated fiddle: http://jsfiddle.net/1v76Lg9f/5/

Kendo grid refresh (databound twice)

I am having a problem while refreshing the kendo grid, for some reason, the dataBound event is activated twice, does someone know what could be the problem? or is this a normal behavior?
$("#grid").data('kendoGrid').dataSource.read();
$("#grid").data('kendoGrid').refresh();
UPDATE:
if i remove the refresh line, the dataBound happens only once
$("#grid").data('kendoGrid').refresh();
Try to give false to autobind and try again.
http://docs.telerik.com/kendo-ui/api/web/grid#configuration-autoBind
If you're simply wanting to update the data, you shouldn't need to call Refresh(). DataSource.Read() should do.
You can remove the below lines to:
$("#KendoGridId").data("kendoGrid").dataSource.read();
$("#KendoGridId").data("kendoGrid").dataSource.page(1);
to:
$("#KendoGridId").data("kendoGrid").dataSource.read();

jqGrid editurl value for local editing?

I have a jqGrid set up with local data. I'm not sending any data to the server until the entire form is filled out. My problem is, when a user adds/edits a row, jqGrid attempts to post the results to the server right then.
I tried leaving out the "editurl" attribute from the jqGrid invocation, but this results in a "No URL is set" error when the user clicks the "submit" button on the popup form for adding/editing records.
I tried putting in a single hash "#" for the editurl value, but this also fails.
Any thoughts?
editurl must be 'clientArray' in your case.
Set editurl:'url', cellsubmit:'clientArray', cellEdit: true
or
here
See this for a complete example of jqgrid local data.
local edit on jqgrid
Change your initial data and your columnmodel, and you will be almost done.
It's not a oneline solution, but, seems this is the way to cope local editing.

Telerik RadCombobox not keeping state when using client side requestItems() to load

I'm using the Telerik RadComboBox control. I have two related combos and when the user selects a value in the first one I filter the second one.
I use the code below to achieve this:
localeCombo = $find("<%= ddlLocale.ClientID %>");
localeCombo.requestItems(item.get_value(), false);
This works totally fine, but when I do a postback my filtered combo resets to the original non filtered list, although all other controls retain their state. I assume this is because the server side list of items is not being updated when I use the client side callback requestItems() function.
Is this the case? Is there a simple way around this?
Any help would be much appreciated!
Thanks
Chris
Yep, most probably your suggestion is true. You may try keeping the second filtered combo value in session or cache storage and then restore it from there on postback - at least this is what I would do.
This is a bug with RadComboBox. I opened a ticket.

jqGrid onselectrow

I'm using a jqGrid, and it gets populated fine. From the UI perspective, one of the columns in the jqGrid is editable. How can I make one of the columns as editable (say like a text box)?
The reason is, in my case when the grid successfully loads, the UI is going to show one of the column's values as editable.
If you're looking to edit the column values directly in the grid, similarly to how you might in Excel, look into the inline editing API:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing&s[]=inline
In colmodel, you have to specify editable: true.Provide edit action link in editURL:... option of jqgrid.
you have to get the "id" of that column and then remove 'disabled' attribute on that.
for example -
$('#idofthatcolumn').removeAttr('disabled');
OR
$('#idofthatcolumn').removeAttr('readonly');
In your colmodel you should specify editable as true i.e, editable:true and specify the editUrl:'localhost:8080/yourApp'
Also if you want to store it in the client side, then specify it as editUrl:'clientArray'

Resources