0

有这样的一些信息的grida

grida = webix.ui({

            view:"datatable",
            columns:[
                { id:"NAME",        header: "Название", width: 300},
                { id:"ISBN10",      header:"ISBN10",      width:150},
                { id:"ISBN13",      header:"ISBN13",    width:300},
                { id:"AUTHOR",      header:"АВТОРЫ", width:150},
                { id:"IDBC",        header:"ЧИТАТЬ", width:150, template: "<input type='button' value='Читать' class='details_button' style='background: #396D9E;background: -moz-linear-gradient(top, #5D91C3 0% , #396D9E 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0,#5D91C3), color-stop(1, #396D9E)); border:1px solid #396D9E; text-shadow: 0 -1px #134471; box-shadow: inset 0px 1px 1px #8eb3d5; -webkit-box-shadow: inset 0px 1px 1px #8eb3d5; color:#FFFFFF; font-size: 15px;'>"},

            ], 

            autoheight:true,
            autowidth: true,
            //url:"data/data2.json",
            url:"data/data_books_catalog.php?XDEBUG_SESSION_START=ELAIN",
            css:"my_style"
        }); 

//有on_click功能与DT grida中的按钮交互

        grida.on_click.details_button=function(e, id, trg){

                    webix.ajax("query.php?bid="+this.getItem(id).IDBC, function(text){   
                    $$("frame-body").define("src", text);
                    }); 
                    $$("book").show();      
                    return false;
        };  

// 和这里的主要问题 -> 如何将 grida 放入单元格中?

    webix.ui({
           type:"space", id:"a1", rows:[{
             type:"space", padding:2, responsive:"a1", cols:[
                 { view:"list", data:["Users", "Reports", "Settings"],
                   ready:function(){ this.select(this.getFirstId()); },
                   select:true, scroll:false, width:200 },
                 { template:"column 2", width:200 },
                 { view: "datable", id: "girda" } // want my grida DT here

                ]}
            ]
    }).show();

感谢帮助

4

1 回答 1

1

使用addView()布局的(在您的情况下插入“a1”布局之一)方法:

例子

于 2016-07-12T15:24:25.737 回答