Hello,
I'm implementing grid control in my project, but i have problems with toolbar, it does not appear. I'm doing everything like in your guides on http://help.syncfusion.com/ug/js/default.htm#!documents/toolbar1.htm and on http://mvc.syncfusion.com/demos/web/Grid/Searching but the toolbar still doesn't work. Can you help me?
Hi Roman,
Thanks for using Syncfusion Products.
We suspect that you have not enabled ‘ShowToolbar’ property of Grid Toolbar. So we suggest you to enable the ‘ShowToolbar’ property. Please refer the following code snippets.
@(Html.EJ().Grid<EJGrid.Models.EditableOrder>("Grid") … .AllowSearching() .ToolbarSettings(tool => { tool.ShowToolbar().ToolbarItems(items => { items.AddTool(ToolBarItems.Search); }); }) ) |
Also could you please check whether you have the files “ejicons.ttf” & “ejicons.woff” in “./common-images/” folder”. If the files are not there in the specified location, please copy those file into your project from the following location.
CSS Files: C:\Program Files (x86)\Syncfusion\Essential Studio\12.2.0.36\JavaScript\assets\css\web
For your convenience we have created a sample and the same can be downloaded from below link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/EJGrid1222671464.zip
Please let us know if you need any further assistance.
Regards,
Alan Sangeeth S
No, it didn't helped. This is my code:
@(Html.EJ().Grid<MyObject>("ExampleTable")
.Datasource(Model)
.AllowPaging()
.AllowSorting()
.EditSettings(edit => edit.AllowEditing().AllowDeleting())
.ToolbarSettings(toolbar => toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Edit);
items.AddTool(ToolBarItems.Delete);
}))
.Columns(col =>
{
col.Field("Id").HeaderText("Id").IsPrimaryKey(true).IsIdentity(true).TextAlign(TextAlign.Left).Width(75).Add();
col.Field("Title").HeaderText("Title").Width(75).Add();
}))}
The two files you mentioned are in correct place. I have noticed, that I'm using older version (12.2400.00.36) of Syncfusion.EJ and Syncfusion.EJ.MVC dll's. Does it matter? I have no possibilities to change now the dll's to newer version.
Hello,
everything works now, update of JavaScript files helped. Thank you for your suport.
Greetings.
Hi Roman,
Thanks for the update.
We are happy to hear that issue has been resolved.
Please let us know if you need any further assistance. We will be happy to help you out.
Regards,
Alan Sangeeth S