1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<script type= "text/javascript" >
$(document).ready(function () {
var countries = 'US,Germany,UK,Japan,Italy,Greece' .split( ',' ),
ids = '001,001,002,002,003,003' .split( ',' ),
data = [];
for (var i = 0; i < countries.length; i++) {
data.push({
id:ids[i%ids.length],
country: countries[i % countries.length],
});
}
var cvTrackingChanges = new wijmo.collections.CollectionView(data);
var grid = new wijmo.grid.FlexGrid( '#gsFlexGrid' ,{
autoGenerateColumns: false ,
columns: [
{ header: 'id' , binding: 'id' },
{ header: 'country' , binding: 'country' },
],
});
grid.itemsSource = cvTrackingChanges;
})
</script>
|
设置某列只读:将isReadOnly属性设置为true。
设置某列的宽度:设置width属性为特定的值。