13 Answers, 1 is accepted
This can be achieved by setting DataSource ServerOperation setting to false and pass the data to the Grid constructor. Please refer to this online demo for an sample code (use the tab of the code view to select the ASP.NET MVC version of the demo).
All the best,Rosen
the Telerik team
Because after add this line:
.DataSource(dataSource => dataSource.Ajax()
.ServerOperation(false)
Any code inside of Template method is ignored and code inside of ClientTemplate is used.
Thanks in advance,
Dzmitry
I'm afraid that when client operation mode or AJAX binding is used, the use of ClientTemplates is required.
Regards,Rosen
the Telerik team
Can i achieve my goal to enable paging at the client side. For example, at the server i load all data that i want to be bound to my grid without enabling paging. When page is loaded, can i set additional options to grid by the js like this:
$("#grid").kendoGrid({pageSize:10, pageable:true});
Is there any chance that this kind of solution can be used? :)
In this case, i can create additional wrappers for this purpose to generate js like this to do any kind of work and to be able to use server side templates for my grid.
Thanks in advance,
Dima
The client templates are required in order the Grid to be rendered, when created as result of some client operation, like paging for example. Server templates will require server template and server rendering.
All the best,Rosen
the Telerik team
If I understood your scenario correctly, you are using filter row feature and do not want autocomplete widgets to use AJAX binding in order to retrieve the data. In this case you could use the BindTo option in order to re-populate the filtering widgets with the required information. For example:
columns.Bound(p => p.ShipName)
.Width(500)
.Filterable(ftb => ftb.Cell(cell => cell.Operator(
"contains"
)
.BindTo((System.Collections.IEnumerable)ViewBag.ShipNames)));
//where ViewBag.ShipNames is populated similar to the following:
ViewBag.ShipNames = GetOrders().Select(o =>
new { o.ShipName }).Distinct();
Regards,
Rosen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
I'm afraid that this is not possible. Although, their initial configuration might be shared (at least in most case) the filter row widgets and grid widgets uses separate DataSource instances. Which should be populated independently.
Regards,
Rosen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hello Bob,
You can log this as a enhancement request in our user voice portal here. When planning for a release we gather and take into account all feedback from the public portal - the most popular request take the highest priority.
Regards,Rosen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hello Bob,
You could override the filter cell input element and prevent the AutoComplete widget creation by using the Template option, similar to the following:
ftb.Cell(cell => cell.Operator("contains").Template("filterCell"))
<
script
>
function filterCell(e) {
e.element.addClass("k-textbox").width("100%");
}
</
script
>
On a side note. As the discussion diverge far from the original topic of the thread, please open a separate support request if additional questions arise.
Regards,
Rosen
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.