我需要在Button Click上弹出一个Kendo Grid.在按钮上单击服务器返回DataTable,其中包含动态列(即1到n个列).单击按钮,我使用jQuery ajax调用获取DataTable.但是我无法绑定那些数据.如何解决此问题
是否可以使用2个单独的Kendo UI网格,并能够通过UI控件来回传递数据(如前进和后退箭头)?
模式将是在左侧获取主列表,选择项目并在右侧具有精致列表。
我有一个kendo下拉列表的问题.Drop down返回对象对象,但我需要字符串.有人可以帮助我.这里是代码.对不起我的英语,我来自俄罗斯
MyScript.js :(从Admin控制器获取数据)
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: {
type: 'odata',
serverSorting: true,
serverFiltering: true,
serverPaging: true,
transport: {
read: {
url: "/api/Admin",
dataType: "json",
contentType: "application/json",
},
create: {
url: "/api/Admin",
dataType: "json",
type: "POST"
},
update: {
url: function (AdminModel) {
return "/api/Admin/" + "?roles=" + AdminModel.Roles
},
dataType: "json",
type: "PUT"
},
destroy: {
url: function (AdminModel) {
return "/api/Admin/" + "?name=" + AdminModel.Name
},
dataType: "json",
type: "DELETE"
},
parameterMap: function (model, operation) {
if …Run Code Online (Sandbox Code Playgroud) 我有个问题.我使用Kendo UI for ASP.NET MVC为我的Web应用程序创建上传功能.它工作得很好,但问题是用户在点击上传按钮后执行提交表单并导航到其他页面之前无法查看他们上传的文件.在这种情况下,我在Create View中放了一个上传器,我希望在将文件上传到服务器之后,我会将该文件的链接存储到db中我的模型的字段中,但它总是得到null值.这里的任何人都可以给我一些建议去做.非常感谢.这是我使用的代码.*控制器:
[HttpPost]
public ActionResult Create(Model model)
{
if(ModelState.IsValid)
{
model.Url = Url;
Db.Models.Add(model);
Db.SaveChanges();
return RedirectToAction("Index");
}
return View(model);
}
public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments)
{
// The Name of the Upload component is "attachments"
foreach (var file in attachments)
{
// Some browsers send file names with full path. We only care about the file name.
var fileName = Path.GetFileName(file.FileName);
var destinationPath = Path.Combine(Server.MapPath("~/Contents/files/"), fileName);
DestinationPath = destinationPath;
file.SaveAs(destinationPath);
}
// Return an empty string …Run Code Online (Sandbox Code Playgroud)