$(document).ready(function() {var viewModel = kendo.observable({title:"Mr",titles:["Mr","Mrs","Ms","Dr","Sir","Prof"],firstName: "",lastName: "",companyName: "",emailAddress:"",phone:"",subject:"Sales Request",subjects:["Sales Request","Literature Request","Recruitment Question","Comment","Other Request"],message:"",agreed: false,confirmed: false,hideMain:true,messageID:"",register: function(e) {$.post("http://myurl/myco/tools/email_form.php",{"title":viewModel.get("title"),"firstName":viewModel.get("firstName"),"lastName":viewModel.get("lastName"),"companyName":viewModel.get("companyName"),"emailAddress":viewModel.get("emailAddress"),"phone":viewModel.get("phone"),"subject":viewModel.get("subject"),"message":viewModel.get("message")},function(data) {// this is the line that raises the this.set error// vvvvvvvvvvvvvvvvvvvvvvvvvvvvthis.set("messageID", data.message);// ^^^^^^^^^^^^^^^^^^^^^^^^console.log(data.message);},"json");e.preventDefault();this.set("confirmed", true);this.set("hideMain",false);},startOver: function() {this.set("confirmed", false);this.set("agreed", false);this.set("hideMain", true);this.set("firstName", "");this.set("lastName", "");this.set("companyName", "");this.set("emailAddress", "");this.set("phone", "");this.set("subject", "Sales Request");this.set("message", "");this.set("messageID", "");this.set("title","Mr");}});kendo.bind($("form"), viewModel);});<?phpecho json_encode(array("message"=>"Request submitted with ID ".$reqid));?>$("#MailConf_Podpis").kendoEditor({ messages: { foreColor: "Kolor czcionki", backColor: "Kolor wyróżnienia tekstu", viewHtml: "Podgląd HTML" } });$("#MailConf_Podpis").kendoEditor({ tools: [ "bold", "italic", "underline", "strikethrough", "fontName", "fontSize", "foreColor", "backColor", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "insertUnorderedList", "insertOrderedList", "indent", "outdent", "formatBlock", "createLink", "unlink", "insertImage", "subscript", "superscript", "viewHtml" ], messages: { bold: "Pogrubienie", italic: "Kursywa", underline: "Podkreślenie", strikethrough: "Przekreślenie", superscript: "Indeks górny", subscript: "Indeks dolny", justifyCenter: "Wyśrodkuj", justifyLeft: "Wyrównaj do lewej", justifyRight: "Wyrównaj do prawej", justifyFull: "Wyjustuj", insertUnorderedList: "Punktory", insertOrderedList: "Numerowanie", indent: "Zwiększ wcięcie", outdent: "Zmniejsz wcięcie", createLink: "Wstaw odnośnik", unlink: "Usuń odnośnik", insertImage: "Wstaw obrazek", insertHtml: "Wstaw HTML", fontName: "Wybierz czcionkę", fontNameInherit: "(zmień czcionkę)", fontSize: "Wybierz rozmiar czcionki", fontSizeInherit: "(zmień rozmiar)", formatBlock: "Formatowanie", style: "Style", emptyFolder: "Pusty Folder", uploadFile: "Wyślij", orderBy: "Arrange by:", orderBySize: "Rozmiar", orderByName: "Nazwa", invalidFileType: "Wybrany przez Ciebie plik \"{0}\" jest nieprawidłowy. Wspierane typy plików {1}.", deleteFile: "Czy jesteś pewien że chcesz usunąć plik \"{0}\"?", overwriteFile: "Plik o nazwie \"{0}\" już istnieje w wybranej lokalizacji. Czy chcesz go nadpisać?", directoryNotFound: "Lokacja o podanej nazwie nie istnieje.", imageWebAddress: "Adres URL", imageAltText: "Tekst alternatywny", linkWebAddress: "Adres URL", linkText: "Tekst", linkToolTip: "Opis", linkOpenInNewWindow: "Otwórz odnośnik w nowym oknie", dialogInsert: "Wstaw", dialogButtonSeparator: "lub", dialogCancel: "Anuluj", foreColor: "Kolor czcionki", backColor: "Kolor wyróżnienia tekstu", viewHtml: "Podgląd HTML" } });We have used kendo grid filter (v2012.3.1315), but filter for string colums isn’t working right because cursor hasn’t focused on filter textbox (we see this behavior in last versions of Chrome and Firefox), in IE datepicker filter cann’t set a value. It works in previous version and in v2012.3.1413. What’s wrong with v2012.3.1315? Can we solve this behavior?
I have a Kendo grid that displays the Grid with Details being a Tab. The first tab basically renders a different partial view based on the Row's StatusID column. The "if" condition within the .Content() method of the tab item script in the template just does not work. The if condition is always false and falls into the “else” block. Is there a specific syntax to get the parent field's value to compare? I tried using the escape characters \\ before the pre-processor character #
Thanks!
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.Name).Groupable(false);
columns.Bound(p => p.StatusName).Width(100);
columns.Bound(p => p.Description).Title("Description").Width(150);
columns.Bound(p => p.City).Width(100);
columns.Bound(p => p.State).Width(70);
columns.Bound(p => p.AssignedTo);
@*
columns.Command(command => command.Custom("View Details").Click("showDetails"));
*@
})
.ClientDetailTemplateId("detailsTemplate")
.Pageable()
.Sortable()
.Scrollable(src => src.Height(500))
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("ViewDetails", "Site"))
.PageSize(20)
)
.Events(events =>
{
events.DataBound("dataBoundDetails");
events.DetailExpand("expandDetails");
})
)
@(Html.Kendo().Window().Name("Details")
.Title("Site Details")
.Visible(false)
.Modal(true)
.Draggable(true)
.Width(500)
)
<script id="detailsTemplate" type="text/kendo-tmpl">
@(Html.Kendo().TabStrip()
.Name("TabStrip_#=Id#")
.SelectedIndex(0)
.Items(items =>
{
//Main
items.Add()
.Text("Details")
.Encoded(false)
.Content(@<text>
@if("#= StatusId #" == "1")
{
@Html.Action("SiteRequestView", "Site")
}
else
{
@Html.Action("EvaView", "Site")
}
</text>);
})
.ToClientTemplate())
</script>
<div id = "griddisplay"> @(Html.Kendo().Grid(Model) .Name("MyGrid") .Columns(columns => { columns.Bound(p => p.RegionId).Title("Region ID").Width("100px"); columns.Bound(p => p.RegionName).Title("Region Name").Width("150px"); }) .Pageable() .Resizable(r=>r.Columns(true)) .Sortable() .Scrollable(scr => scr.Height("200px")) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("GridTest", "MyController") ) ) ) </div>#griddisplay {width:520px;font-size:12px}