I have an issue with a grid header expanding when I add more data.
My client code is:
var clientDataSource = new kendo.data.DataSource({
schema: {
model: {
id: "id",
fields: {
RecordId: { type: "string" }
,RecordType: { type: "string" }
,RecordName: { type: "string" }
}
}
}
,data:[]
});
$(document).ready(function () {
$("#gridNotificationObject").kendoGrid({
columns:
[{field: "RecordType",title: "Type", width:100}
,{field: "RecordName",title: "Name"}
]
,sortable:true
,selectable: true
,filterable: false
, scrollable: true
, size: { height: 250 }
,dataSource: clientDataSource
});
});
I am adding data with:
clientDataSource.add({
RecordId: type + id
,RecordType: title
,RecordName: name
});
clientDataSource.sync();
My client code is:
var clientDataSource = new kendo.data.DataSource({
schema: {
model: {
id: "id",
fields: {
RecordId: { type: "string" }
,RecordType: { type: "string" }
,RecordName: { type: "string" }
}
}
}
,data:[]
});
$(document).ready(function () {
$("#gridNotificationObject").kendoGrid({
columns:
[{field: "RecordType",title: "Type", width:100}
,{field: "RecordName",title: "Name"}
]
,sortable:true
,selectable: true
,filterable: false
, scrollable: true
, size: { height: 250 }
,dataSource: clientDataSource
});
});
I am adding data with:
clientDataSource.add({
RecordId: type + id
,RecordType: title
,RecordName: name
});
clientDataSource.sync();