使用kendoUpload控件编辑kendo网格

时间:2019-11-13 19:52:14

标签: kendo-ui kendo-grid

有人在kendo网格中添加kendoUpload控件吗?我想添加它,这样就不必构建额外的面板来存储控件了?

  

我是否会将其添加为模板?

import itertools

step = 0.05

configs = itertools.product(
    np.arange(0, 1, step),
    np.arange(0, 1, step),
    np.arange(0, 1, step),
    np.arange(0, 1, step),
)

for x, y, z, p in configs:
    if round(x, 2) + round(y, 2) + round(z, 2) + round(p, 2) == 1:
        print(f"x = {round(x,2)} y = {round(y,2)} z = {round(z,2)} p = {round(p,2)}")
        ## RMSE calculation code goes, if best store X,Y,Z,P

上传的代码

       if (!kendoGrid) {
        $("#kgridDocuments").kendoGrid({
            scrollable: false,
            toolbar: ["search", "create","save", "cancel"],

            ],
            noRecords: {
                template: "No Result Found."
            },
        });
    }

    var kendoUpload = $("#uploadMeetingDocument").data("kendoUpload");
    if (!kendoUpload) {
        $("#uploadMeetingDocument").kendoUpload();
    }

1 个答案:

答案 0 :(得分:2)

是的,您可以在网格内添加一个上载组件。使用列模板创建输入标签,并使用dataBound函数初始化kendoUpload组件。这是一个示例,可能会对您有所帮助。

  createProject$ = createEffect(() => this.actions$.pipe(
    ofType(CREATE_PROJECT),
    switchMap(({ name, id }) => this.myService.createProject(name, id).pipe(
      concatMap(project => [
        CREATE_PROJECT_SUCCESS(project),
        NAVIGATE({ path: ['foo', project.id] })
      ]),
      catchHttpError()
    )),
  ));