Open farzinmonsef opened 6 years ago
http://blog.codebeastie.com/kendo-grid-style-and-formatting/
https://nitinasp.wordpress.com/2014/03/20/auto-refresh-of-kendo-grid/
public ActionResult ViewLyubomir()
{
return PartialView("_Lyubomir");
}
@Html.ActionLink("Lyubomir ", "ViewLyubomir", "Home", null, new { @class = "modal-link btn btn-success" })
public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<style>
.modal-content {
width: 600px !important;
margin: 30px auto !important;
}
</style>
+++++++++++++++++++++++++++ Body +++++++++++++++++++++++++++
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
<div id="modal-container" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-content">
</div>
</div>
+++++++++++++++++++++++++++++
<script type="text/javascript">
$(function () {
// Initialize numeric spinner input boxes
//$(".numeric-spinner").spinedit();
// Initalize modal dialog
// attach modal-container bootstrap attributes to links with .modal-link class.
// when a link is clicked with these attributes, bootstrap will display the href content in a modal dialog.
$('body').on('click', '.modal-link', function (e) {
e.preventDefault();
$(this).attr('data-target', '#modal-container');
$(this).attr('data-toggle', 'modal');
});
// Attach listener to .modal-close-btn's so that when the button is pressed the modal dialog disappears
$('body').on('click', '.modal-close-btn', function () {
$('#modal-container').modal('hide');
});
//clear modal cache, so that new content can be loaded
$('#modal-container').on('hidden.bs.modal', function () {
$(this).removeData('bs.modal');
});
$('#CancelModal').on('click', function () {
return false;
});
});
</script>
body { padding-top: 50px; padding-bottom: 20px; }
/ Set padding to keep content from hitting the edges / .body-content { padding-left: 15px; padding-right: 15px; }
/ Set width on the form input elements since they're 100% wide by default / input, select, textarea { max-width: 280px; }
/ styles for validation helpers / .field-validation-error { color: #b94a48; }
.field-validation-valid { display: none; }
input.input-validation-error { border: 1px solid #b94a48; }
input[type="checkbox"].input-validation-error { border: 0 none; }
.validation-summary-errors { color: #b94a48; }
.validation-summary-valid { display: none; }
2018-March-kendo grid good tips