or
$(
"#grid_detail"
).kendoGrid({
dataSource: {
data: orders
},
filterable: {
extra:
false
,
operators: {
string: {
contains:
"Contains"
,
}
}
},
sortable:
true
,
columns: [
{
field:
"Buyer"
,
title:
"buyer"
,
width:
"40"
},
{
field:
"name"
,
title:
"Article name"
,
width:
"40"
},
{
field:
"paid"
,
title:
"Paid"
,
width:
"20"
,
filterable:
false
}
]
});
filterable:
function
(element){
element.kendoAutoComplete({
dataSource: orders,
dataTextField:
"buyer"
,
})
}
$(
"#workSplitter"
).kendoSplitter({
orientation:
"horizontal"
,
panes: [
{ collapsible:
false
, size:
"20%"
},
{ collapsible:
false
, size:
"80%"
}
],
resize:
function
() {
window.setTimeout(
function
() {
if
(tabExists(
"Transactions"
)) {
resizeGrid(
"#mainGrid"
);
}
resizeGrid(
"#activityGrid"
);
}, 1);
}
});
function
resizeGrid(gridSelector) {
var
element = $(gridSelector),
dataArea = element.find(
'.k-grid-content'
),
elementHeight = element.innerHeight(),
otherElements = element.children().not(
'.k-grid-content'
),
otherElementsHeight = 0;
otherElements.each(
function
() {
otherElementsHeight += $(
this
).outerHeight();
});
dataArea.height(elementHeight - otherElementsHeight);
}
#workTabs {
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
right
:
0
;
width
:
auto
;
height
:
auto
;
}
#workTabs > .k-content {
position
:
absolute
;
top
:
34px
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}