or
var timeout;
var filter = { logic: "and", filters: [] };
var filterRow = $('<
tr
><
td
><
input
type
=
"search"
id
=
"programCodeFilter"
class
=
"k-textbox"
style
=
"width:75px;"
></
td
><
td
><
input
type
=
"search"
id
=
"lenderProgramNameFilter"
class
=
"k-textbox"
style
=
"width:75px;"
></
td
><
td
></
td
><
td
></
td
><
td
></
td
><
td
></
td
><
td
></
td
><
td
></
td
></
tr
>')
detailGrid.data("kendoGrid").thead.append(filterRow);
detailGrid.find("input#programCodeFilter").keydown(function () {
var filterExpr = { field: "ProgramCode", operator: "startswith", value: "" }
var fc = 0;
if (filter.filters.length > 0) {
for (var i = filter.filters.length - 1; i >= 0; i--) {
if (filter.filters[i].field == 'ProgramCode') {
var rmFilter = filter.filters[i];
rmFilter.value = this.value;
fc++;
}
}
if (fc == 0) {
filter.filters.push(filterExpr);
}
} else {
filterExpr.value = this.value;
filter.filters.push(filterExpr);
}
clearTimeout(timeout);
timeout = setTimeout(function () {
detailGrid.data("kendoGrid").dataSource.filter([filter]);
}, 100);
});
<
div
id
=
"selectMenu"
data-role
=
"view"
data-title
=
"Emp-Suc"
data-model
=
"selectMenu_model"
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
>
<
li
>
<
label
>
Fecha Proceso
<
input
type
=
"date"
data-bind
=
"value: processDate"
/>
</
label
>
</
li
>
<
li
>
<
i
></
i
><
a
data-role
=
"button"
data-bind
=
"click:submit"
style
=
"float: right;"
data-icon
=
"details"
>Continuar</
a
>
</
li
>
</
ul
>
</
div
>
var selectMenu_model = new kendo.observable({
company: null,
branch: null,
processDate: "",
companies: function(){
dataConfigurationHierarchical.set("method","GetCompanies");
dataConfigurationHierarchical.set("params", { login: kendo.stringify(userModel.get("login"))});
return dataConfigurationHierarchical.getSource();
},
branches: function(){
dataConfigurationHierarchical.set("method","GetBranches");
dataConfigurationHierarchical.set("params", { login: kendo.stringify(userModel.get("login"))});
return dataConfigurationHierarchical.getSource();
},
submit: function(){
var cp = $("#company").data("kendoDropDownList").value();
var br = $("#branch").data("kendoDropDownList").value();
var pd = selectMenu_model.get("processDate");
//console.log("Compañia: " + cp + " Sucursal: " + br);
if(cp !== '' && br !== '' && pd !== ''){
app.navigate("views/menu.html");
}
},
});
01.
@(Html.Kendo().PanelBar()
02.
.Name("NavigationBar")
03.
.Items(panelBar =>
04.
{
05.
panelBar.Add().Text(@LayoutResource.Actions)
06.
.Items(item =>
07.
{
08.
item.Add().Content("<
a
href=\"#\"><
span
class=\"badge pull-right\">42</
span
>Home</
a
>");
09.
});
10.
}
11.
)
12.
)
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
link
href
=
"kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"kendo.default.min.css"
rel
=
"stylesheet"
/>
<
script
src
=
"jquery.min.js"
></
script
>
<
script
src
=
"kendo.all.min.js"
></
script
>
<
script
>
$(function () {
var data = [{ Name: 'Tab 1', Url: '#content1' }, { Name: 'Tab 2', Url: '#content2' }];
$("#tabstrip").kendoTabStrip({
dataTextField: "Name",
dataUrlField: "Url",
dataSource: data,
select: function (el) {
//would be nice to have a reference to the data source data item here rather than relying on the item index.
var itemIndex = $(el.item).index();
$('.tabContent').hide();
$('#content' + itemIndex).show();
}
});
getSelectedTabIndex = function () {
return $("#tabstrip").data("kendoTabStrip").select().index();
}
$('#showSelectedTabIndex').click(function () {
//always returns -1
alert(getSelectedTabIndex());
});
});
</
script
>
</
head
>
<
body
>
1.) Click a tab <
br
/>
2.) Click the Show Selected Tab Index button.<
br
/>
<
br
/>
The tab is not visually selected and the value returned for the selected index is -1.
<
br
/><
br
/>
<
button
id
=
"showSelectedTabIndex"
>Show Selected Tab Index</
button
>
<
div
id
=
"tabstrip"
></
div
>
<
div
id
=
"content0"
class
=
"tabContent"
style
=
"display:none;"
>Content 1</
div
>
<
div
id
=
"content1"
class
=
"tabContent"
style
=
"display:none;"
>Content 2</
div
>
</
body
>
</
html
>