BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Query 1: Would you have any advice to get syncfusion MVC5 working with bootstrap 2.3?
We have analyzed your query and we would like let you know that our control supports bootstrap 2.3 version also. But, in this version, some styles has been applied to element if the element’s class name has been ended as “span”.
Please refer the below styles that are in bootstrap 2.3 version CSS file.
CSS-[bootstrap.2.3 version] [class*="span"] { float: left; min-height: 1px; margin-left: 20px; |
In our control, we have used class name “e-toolbarspan” for some internal process. So above styles applied to this tool bar element also. In earlier version of bootstrap CSS files these styles are removed.
If you want to use the bootstrap 2.3 version in your project, Please use below code in your view page to resolve the reported issue.
<style> .e-toolbarspan { float:none; margin-left:auto; } |
Query 2: I need that the toolbar items redirect to another page, Is there any way to do that? For example, I need Edit button on toolbar redirects to another page, BUT If possible I would like to preserve the validation when no row is selected.
We suggest you to use ToolbarClick client side event and set the args.cancel as true based on the itemName to prevent the default actions performed by tool bar item. After that we can perform our custom actions like redirect the page on edit tool item click based on the selected record length. Please refer the below code snippet for further details.
[index.cshtml] @(Html.EJ().Grid<object>("Grid") ----------- ----------- .ClientSideEvents(eve => { eve.ToolbarClick("toolbarClick"); }) function toolbarClick(args) { if (args.itemName == "Edit") { args.cancel = true; // Cancel the default edit action // Get selected records length if (this.getSelectedRecords().length > 0) { var OrderID = this.getSelectedRecords()[0].OrderID; window.location.rel='nofollow' href = "/Home/SelectedData?OrderID=" + OrderID; } else alert("No Records Selected") } public ActionResult SelectedData(int OrderID) { // Write your code here return View(data); |
For your convenience we have created a simple sample and the same can be downloaded from the below link.
Sample Link: http://www.syncfusion.com/downloads/support/forum/119202/ToolbarBootstrap189155041.zip
Please let us know if you have any concerns.
Regards,