aurelia-ui-toolkits / aurelia-syncfusion-bridge

27 stars 21 forks source link

Is there a property that exposes the widget? #38

Closed gregoryagu closed 7 years ago

gregoryagu commented 7 years ago

In the Kendo-UI bridge, there is a "k-widget" that is useful to get at the underlying control.

<ak-treeview k-data-source.bind="dataSource" k-widget.bind="treeView"></ak-treeview>

I can then use "treeView" in the code behind so I can call methods, properties etc.

Is there a similar one for Syncfusion?

adriatic commented 7 years ago

As far as I remember, we introduced the k-widget after Syncfusion bridge was built (by Syncfusion team, using our technology and guidance.

Let's see of some of the Syncfusion team responds to this question.

karthickthangasamy commented 7 years ago

Right now there is no option like k-widget in Syncfusion bridge. But you can get the underlying control data object in jquery approach, using the object you can invoke the methods and properties.

let obj = $("#treeview").data("ejTreeView");
obj.method();

Reference link : https://help.syncfusion.com/js/invoking-methods

karthickthangasamy commented 7 years ago

@JeroenVinke Could you please share the k-widget property bridge developer notes?

JeroenVinke commented 7 years ago

Sure, i'll write them up in the next few days

JeroenVinke commented 7 years ago

@Karthick-NR here I have added the notes: https://aurelia-ui-toolkits.gitbooks.io/kendoui-bridge-docs-beta/content/k-widget.html

gregoryagu commented 7 years ago

Any progress on this?

karthickthangasamy commented 7 years ago

@gregoryagu aurelia-syncfusion-bridge@0.5.0 release with e-widget property.

//attached with TaskQueue
    attached() {
        this.taskQueue.queueTask(() => {
            setTimeout(() => {                
                console.log(this.grid);
            }, 1);
        });
    }
//attached with setTimeout 
attached() {
        setTimeout(()=>{
            console.log(this.grid);
        },50)
    }
//Event handler of ejGrid
    recordClick(e) {
        console.log(this.grid);
    }