Kendo UI ComboBox : Automatic Load On Demand - telerik

Initially we are using Telerik ASP.NET combo box. For this having load on demand option ( link). Now we are moving to Kendo UI combo box.
This combo box doesn't contain all options (which are present in telerik asp.net combobox) like Load on demand , ShowMoreResultsBox.. etc.
Could you please provide solution for updating item on Load on demand
#(Html.Kendo().ComboBox()
.Name("fabric")
.Filter("contains")
.Placeholder("Select fabric...")
.DataTextField("Text")
.DataValueField("Value")
.DataSource(source =>
source.Read(read =>
{
read.Url("http://localhost:59590/api/Search/LoadonDemand");
}).ServerFiltering(true))
.HighlightFirst(true)
.IgnoreCase(true)

This is the post for this on Kendo Premium forums itself. Just updating so that SO also has its update: Update items for ComboBox with Load on demand
Just copying their reply.
1st reply
Basically to achieve the "Load on demand" behavior you should also set
the "AutoBind" option to false - that way the ComboBox will request
the data only when requested by the user. Additionally you can modify
the server to restrict the response to for example 5 records. That way
the ComboBox will load only 5 records, related to current search text
on demand.
2nd reply
I'm afraid that loading items on demand inside the ComboBox result
drop-down currently is not supported out of the box and the solution
from my previous reply should be used instead. Also please note that
the KendoUI UserVoice already have such idea added and you can vote
for it here (most voted ideas are included in next KendoUI releases).

Related

Kendo MVC: editable grid with local data

I want to create editable Kendo MVC grid bound to local data(some IEnumerable<>).
I found this and this. But first is only for js and second is not ediatable.
Is it possible?
I have tried all modes of Editable. But Editable() requires to specify related actions and it's impossible to prevent its execution.
As far as I know, editing is not supported with server side binding. In the past, I have used a Template column with links to edit the items. An example:
cols.Template(#<text>Edit</text>)

Kendo UI - Grid questions

I am evaluating Kendo UI for use of it in our project. I would be using the Kendo UI JS (not the ASP.Net MVC one).
I stumbled upon a couple of things Kendo grid does not support. I just want clarification on some of the functionalities (some of the questions may sound very basic. Sorry I am just evaluating on the basis of demos provided and trying to fit in our requirement). I do not require any code but just require your help in evaluating kendo UI
Kendo Grid does not support Grouping of Headers ?
|-----------Header Master------------------|
|--Sub Header-------|-----Sub Header----|
Kendo Grid does not support Frozen Columns ?
Does Kendo Grid support multiple summary columns with custom aggregate(that would be pulled from data source and hence not calculated on client side) ? How can we achieve this ? By Customer Footer template ?
I could not find any example on the website, which shows how kendo ui grid deals with large data. say 10,000 rows ?
Answers to the questions at the current moment (28/10/2013):
Kendo Grid does not support grouped Headers ( you can search the
forums for some feasible work-arounds)
Kendo Grid does not
supported frozen-columns, however it should be implemented for the
future releases.
What is supported as footer templates is
demonstrated here.
What do you mean by larget data? If you
enable server paging only the records for a specific page will be
send to the client, so you can use it with as many records as you
want. Also check virtualization (please notice it still works
the same as a paging mechanism, so you can use it again the same way
as in a regular paging scenario)

Kendo Grid - Lazy Load On Popup Edit

I am using Kendo UI ASP.NET MVC Grid (Razor) in Ajax mode with a popup editor.
As an example say: Customers have orders
User of the application go to a grid that displays all customers. User is allowed to add/edit/delete customers (and their orders). But when the user clicks on edit and the popup editor comes up that is when I want to load orders. I do not want to load orders eagerly since a customer may have many orders and the user may never edit any customer at all.
Seems like this should be a simple thing to do. I have looked through all forums/questions. I have not been able to find such an example. Can someone help me with this?
Thanks a bunch!
j
Are the orders already loaded when the initial grid is loaded (are they in the model)?
If not, one way to do this is define a grid in your popup editor and set .Autobind(false) and set its Read action to a Controller/action.
When editing a record, you can fire a .refresh() on the datasource of the Orders grid.
I would need some more info on the structure of the template and the grid.

Kendo UI grid - different templates for Edit and Create

We are using Kendo UI grid to display some records. The requirements need us to have a column (Say "File Name")shown as a text box when the user clicks on "Edit".
However, when user clicks on the "Create" button in the toolbar, the same column should be replaced with a File Select control which will allow the user to select a file from his machine. The other columns remain the same.
I have already tried searching through Stack Overflow as well as the Kendo UI Grid forums, but to no avail.
Is there any way to achieve this? Any pointers will be of great help.
Regards,
Nikhil
Using different editor templates for create/edit is not supported. You need to use the edit event of the Grid to change that text input to file input with JavaScript. To distinguish between edit and create you can use the isNew() method of the model.
i.e.
edit:function(e){
if(e.model.isNew()){
//replacement logic
}
}
Similar question is covered here.

jqGrid using radio buttons for editable rows

I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is to provide a grid of data to the end user, and they can then edit this. The data is machine-generated, and the users will be confirming if the machine is correct or not.
I think ideally for speed, I'd like to provide a row per item, with a radio button group as the editable. The users could then pick from the values 'Unknown', 'Correct', 'Incorrect'.
As there will be a lot of data, I'd also like to provide a control of some type that can set all rows in the grid to one of the available radio button choices, for the user experience.
Given that there seems to be no native support for this in jqGrid, I wanted to ask if anyone has had any experience writing something like this, and whether this is achievable and reliable, or whether I should stick with the drop-down editable approach that is native to jqGrid.
To implement radio button as the editable instead of the standard drop-down editable approach you can use so named custom editing feature of jqGrid (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#custom). This allows you to create any custom control to edit the cell value. An example of the implementation you can find here: Add multiple input elements in a custom edit type field.
To set all rows in the grid to one of the available radio button choices you can use either a control outside of jqGrid or add an additional custom button in the navigation bar (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons). If you search for navButtonAdd you will find a lot of examples how to implement this, for example, Jqgrid: navigation based on the selected row. Because you use server based data, you can just call a method on the server to make the changes which you need and then call trigger("reloadGrid") to refresh jqGrid data.

Resources