In my header I use
<link rel="stylesheet" type="text/css" href="http://w2ui.com/src/w2ui-1.4.3.min.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="http://w2ui.com/src/w2ui-1.4.3.min.js"></script>
But if I add by toolbar new row - all working good !
Framework web2ui required in grid as id field with name "recid", but I made mistake and send data with field "recID" ...
Related
i have dropdownlist filled with data from database i used Jquery to have multiselect option.
i want to append the checked values to array so i can insert it to the database. how can i do it using jquery or c#?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
<link href="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/css/bootstrap-multiselect.css" rel="stylesheet" type="text/css" />
<script src="http://cdn.rawgit.com/davidstutz/bootstrap-multiselect/master/dist/js/bootstrap-multiselect.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('[id*=lstAteend]').multiselect({
includeSelectAllOption: true
});
});
</script>
<asp:ListBox ID="lstAteend" runat="server" SelectionMode="Multiple" Width="150px"></asp:ListBox>
Sample Fiddle
I add a save button for sample to get all selected value :
<input type="button" id="btnget" value="Save" />
and On jquery :
$(document).ready(function() {
$('#teams').multiselect();
$('#btnget').click(function() {
alert($('#teams').val());
})
});
You Get a selected value in comma separator.
I was trying to add kendo Map, i added necessary css and script files but i am not getting #(Html.Kendo().Map() i am getting all other widgets like splitter ,slider ,grid but no Map.
What would be the reason any guess?
Added files and dll shown below
<link href="~/Content/kendo.common.min.css" rel="stylesheet" />
<link href="~/Content/kendo.default.min.css" rel="stylesheet" />
<link href="~/Content/kendo.dataviz.default.min.css" rel="stylesheet" />
<link href="~/Content/kendo.default.min.css" rel="stylesheet" />
<script src="~/Scripts/jquery.min.js"></script>
<script src="~/Scripts/kendo.all.min.js"></script>
<script src="~/Scripts/kendo.aspnetmvc.min.js"></script>
#using Kendo.Mvc.UI;
EDIT
It seems Map is not supported in kendo or some .js sequence i am missing or something overriding?
I'm trying to add datapicker to my project. I have followed a tutorial.
I have added the following code to the DatePickerReady.js file:
$(function () {
$(".datefield").datepicker();
});
I have added the following code at bottom of the head element in the Views\Shared_Layout.cshtml file.
<link href="#Url.Content("~/Content/themes/base/jquery.ui.core.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")" rel="stylesheet" type="text/css" />
<link href="#Url.Content("~/Content/themes/base/jquery.ui.theme.css")" rel="stylesheet" type="text/css" />
<script src="#Url.Content("~/Scripts/jquery.ui.core.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/DatePickerReady.js")" type="text/javascript"></script>
I have added this to Views\Home\Index.cshtml
#model Nullable<DateTime>
#{
string dts ="";
if (Model != null)
{
dts = ((DateTime)Model).ToShortDateString();
}
#Html.TextBox("start", String.Format("{0:d}", dts), new { #class = "datefield", type = "date" })
}
But when I focus/click the textbox it does nothing. The calendar doesn't appear. I'm not getting any errors as well.
Any clue?
Firstly make sure you have included all your scripts, from the scripts you have posted I did not see jquery.js, also make sure that these scripts are indeed available i.e check thier paths.
Use firebug and find out if you are getting any console errors when you click on the dateTime textbox.
Next check if the class is being attached to html textbox input and the jquery call is also made, verify these.
Here is a simple step by step guide to using Datepicker in ASP.NET MVC 3 : Introduction to jquery Date Picker in ASP.NET MVC
and I am very curious to know what does DatePickerReady.js do ?
I'm getting this error when I start my project
It is being caused by the css and js files in the master page.
<link href="../assets/css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
When I remove this line the project starts functioning correctly(without the style)
Any ideas
Sp
Since this is ASP.NET, use a tilde ~ to mark the application root:
<link href="~/assets/css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
I have an application that contains this code:
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/facebox.js" type="text/javascript"></script>
<link href="facebox.css" rel="stylesheet" type="text/css" />
<script language="Javascript">
$(document).ready(function () {
$('a[rel=facebox]').facebox();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<a rel="facebox" href="WebForm1.aspx">Open Facebox Dialog with 0 opacity</a>
</form>
</body>
</html>
In this one the facebox works very well,
Im applying the same principle in another application in which i render my anchor
dynamically :
link = new HtmlGenericControl("a");
link.InnerText = Path.GetFileName(value);
link.Attributes.Add("rel", "facebox");
link.Attributes.Add("href", "WebForm1.aspx");
panel.Controls.Add(link);<br/>
and ive got this code on my page
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/facebox.js"></script>
<link href="css/facebox.css" rel="stylesheet" type="text/css" />
<script language="Javascript">
$(document).ready(function () {
$('a[rel=facebox]').facebox();
});
</script>
In this one Im having an error on facebox(). Object doesnt support this property or method.Why m i getting this error although i do have the same code in another application
and it works perfectly there ?!?!
Thanks alot
And, is the path js/facebox.js exists inside the page location?
Remember that the link to the js file will be relative to the current page location since you are not providing ab absolute path to the file and probabliy you are using a page in a diferent location from the Master.Page of the site root .
I dont know why, but when i put the script tage inside the body it worked