If I use below way to set Grid selection:
$(document).ready(function () {
}
row selection will not succeed, if uncomment "alert()", row selection is working.
So I only can use below way to implement row selection in document.ready without "alert":
But for DropDownList, it is not so lucky.
DropDownList hasn't dataBound event, if I need to set its value during loading as below:
It fails.
Could you figure out a way to implement setting DDL's value in loading?
btw: all these UI Widget are in Kendo Tab.
$(document).ready(function () {
}
$(document).ready(
function
() {
$(
"#grid"
).kendoGrid(...);
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
//alert(1);
var
selection = grid.tbody.find(
">tr"
).eq(1);
grid.select(selection);
}
row selection will not succeed, if uncomment "alert()", row selection is working.
So I only can use below way to implement row selection in document.ready without "alert":
$(document).ready(
function
() {
var
grid = $(
"#grid"
).kendoGrid(...
dataBound:
function
() {
var
selection = grid.tbody.find(
">tr"
).eq(1);
grid.select(selection);
}
).data(
"kendoGrid"
);;
}
But for DropDownList, it is not so lucky.
DropDownList hasn't dataBound event, if I need to set its value during loading as below:
$(document).ready(
function
()
{
$(
"#DDL"
).kendoDropDownList(...);
//alert(1)
DDL
.value(1);
}
Could you figure out a way to implement setting DDL's value in loading?
btw: all these UI Widget are in Kendo Tab.