- Home
- Forum
- ASP.NET Web Forms
- CustomToolBarItem breaks the grid after any Grid postbacks
CustomToolBarItem breaks the grid after any Grid postbacks
Uncaught TypeError: Cannot read property 'replace' of undefined ej.web.all.min.js:10
I have removed everything from my template and placed only a line of text and tested - error. I even copy/pasted your ToolBar Item Template demo code into my page and tested it - error. I have no visible JavaScript errors until I add the CustomToolBarTemplate tags.
Please help! Im running close on a deadline and need to try and make this work
Thanks for using Syncfusion Products.
We considered this “Script error is occurred when using the TemplateID in CustomToolbarItem while triggered the serverside events” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
We suggest you to use the below workaround solution to resolve your reported issue until then.
Sample: Sample
|
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" AllowGrouping="True" OnServerRecordClick="DefaultEvents_OnServerRecordClick" OnServerToolBarClick="DefaultEvents_OnServerToolBarClick" > <ClientSideEvents Load="load" /> <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit"> <CustomToolbarItem> <ej:CustomToolbarItem TemplateID="#Refresh" /> </CustomToolbarItem> </ToolbarSettings>
. . . . .
<script> function load(args) { if (ej.isNullOrUndefined(this.model.toolbarSettings.customToolbarItems[0].templateID)) this.model.toolbarSettings.customToolbarItems[0].templateID = "#Refresh"; } |
By using Clientside events we have assigned the TemplateIdID to the customToolbarItems. Kindly try using the above code example and get back to us if you have any concerns.
Regards,
Balaji Marimuthu
- 1 Reply
- 2 Participants
-
CT Corey Thompson
- Jul 9, 2015 08:50 PM UTC
- Jul 10, 2015 11:21 AM UTC