This is a migrated thread and some comments may be shown as answers.

Change toolbar text in the javascript event

3 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 2
Dan asked on 04 Jun 2014, 08:13 PM
Is there a way to reference the toolbar from the Events function in order to change the text content of the toolbar?

Dan

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 05 Jun 2014, 08:22 AM
Hi Dan,


The context of this in the Grid event handlers is set to the instance of the widget. You could use it to access the wrapper and then the toolbar.
E.g.
function onEvent(e){
    var toolbar = this.wrapper.find(".k-grid-toolbar");
}


Regards,
Dimiter Madjarov
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.

 
0
Dan
Top achievements
Rank 2
answered on 05 Jun 2014, 12:25 PM
Dimiter, thanks.
I am converting an ASP.NET AJAX web site to MVC, and there are a number of event tweaks that I wish to do with various grids.  So, in using events.DataBound I'm am wondering where the documentation is for referencing the grid components from the event.  I have not been able to find any documentation on this.  Thus the preceeding question.

Dan
0
Accepted
Dimiter Madjarov
Telerik team
answered on 05 Jun 2014, 12:35 PM
Hi Dan,

The wrapper field is common for almost all of the Kendo UI widgets. Regarding the specific Grid fields that could be accessed through the widget instance, you could check the Grid API documentation.


Regards,
Dimiter Madjarov
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.

 
Tags
Grid
Asked by
Dan
Top achievements
Rank 2
Answers by
Dimiter Madjarov
Telerik team
Dan
Top achievements
Rank 2
Share this question
or