Column Styling

FlexGrid columns have a few properties that affect styling:

  • cssClass: Specifies a class name to be added to cells in the column. The class name can be used in CSS rules to modify the style of cells in the column.
  • align: Specifies the horizontal alignment of text in the cells. This property is set to null by default, which causes the grid to select the alignment based on the column's dataType (numbers are right-aligned, Boolean values are centered, and other types are left-aligned). If you want to override the default alignment, set this property to 'left' 'right', or 'center'.
  • wordWrap: Specifies whether text in the cells should be allowed to wrap within the cell. Note that the grid will not adjust the row heights to fit the cell content unless you call the autoSizeRows method.

The cssClass is the most powerful and flexible of the three properties, but align and wordWrap are simple and convenient. Also, align and wordWrap apply to all cells, including headers, while cssClass applies only to the scrollable cells.

The grid below shows the effect of these properties.

ID
Country
Product
Comment
Sales
Expenses
0
US
Phones
This item has a long comment so it will wrap in the cell.
$81,733
$38,401
1
Germany
Computers
$20,603
$27,944
2
UK
Cameras
$44,218
$48,877
3
Japan
Stereos
$29,191
$23,366
4
Italy
Phones
$46,951
$49,108
5
Greece
Computers
This item has a long comment so it will wrap in the cell.
$86,237
$49,767
6
US
Cameras
$31,459
$40,845
7
Germany
Stereos
$99,190
$1,631
8
UK
Phones
$52,628
$46,701
9
Japan
Computers
$54,682
$4,055
10
Italy
Cameras
This item has a long comment so it will wrap in the cell.
$45,333
$14,859
11
Greece
Stereos
$64,270
$38,148
12
US
Phones
$38,100
$17,157
13
Germany
Computers
$50,513
$35,799
14
UK
Cameras
$27,345
$45,355
15
Japan
Stereos
This item has a long comment so it will wrap in the cell.
$33,716
$22,860
16
Italy
Phones
$22,131
$20,504
17
Greece
Computers
$61,983
$24,398
18
US
Cameras
$87,819
$41,271
19
Germany
Stereos
$85,822
$33,987
20
UK
Phones
This item has a long comment so it will wrap in the cell.
$21,841
$44,768
21
Japan
Computers
$8,658
$41,929
22
Italy
Cameras
$64,412
$41,341
23
Greece
Stereos
$99,997
$24,068
24
US
Phones
$71,973
$40,473
25
Germany
Computers
This item has a long comment so it will wrap in the cell.
$72,909
$35,923
26
UK
Cameras
$90,518
$9,456
27
Japan
Stereos
$54,080
$16,275
28
Italy
Phones
$46,840
$41,675
29
Greece
Computers
$79,363
$38,225
30
US
Cameras
This item has a long comment so it will wrap in the cell.
$29,500
$26,139
31
Germany
Stereos
$33,259
$14,336
32
UK
Phones
$22,252
$9,344
33
Japan
Computers
$62,462
$34,652
34
Italy
Cameras
$92,764
$11,067
35
Greece
Stereos
This item has a long comment so it will wrap in the cell.
$6,652
$45,005
36
US
Phones
$9,398
$7,455
37
Germany
Computers
$60,987
$47,652
38
UK
Cameras
$14,806
$33,881
39
Japan
Stereos
$22,540
$30,909
40
Italy
Phones
This item has a long comment so it will wrap in the cell.
$36,094
$42,524
41
Greece
Computers
$28,165
$35,249
42
US
Cameras
$98,881
$19,357
43
Germany
Stereos
$28,033
$25,329
44
UK
Phones
$5,701
$14,028
45
Japan
Computers
This item has a long comment so it will wrap in the cell.
$84,642
$30,658
46
Italy
Cameras
$74,233
$20,094
47
Greece
Stereos
$13,070
$34,983
48
US
Phones
$83,057
$34,256
49
Germany
Computers
$17,277
$9,227
50
UK
Cameras
This item has a long comment so it will wrap in the cell.
$25,075
$49,856
51
Japan
Stereos
$6,344
$13,184
52
Italy
Phones
$56,809
$32,300
53
Greece
Computers
$97,013
$3,885
54
US
Cameras
$15,577
$40,683
55
Germany
Stereos
This item has a long comment so it will wrap in the cell.
$57,539
$27,643
56
UK
Phones
$99,455
$15,082
57
Japan
Computers
$46,570
$24,154
58
Italy
Cameras
$7,169
$11,512
59
Greece
Stereos
$44,690
$22,554
60
US
Phones
This item has a long comment so it will wrap in the cell.
$38,884
$40,802
61
Germany
Computers
$91,363
$1,479
62
UK
Cameras
$96,289
$49,679
63
Japan
Stereos
$65,352
$13,916
64
Italy
Phones
$58,779
$38,610
65
Greece
Computers
This item has a long comment so it will wrap in the cell.
$42,043
$48,747
66
US
Cameras
$97,289
$12,759
67
Germany
Stereos
$89,725
$8,911
68
UK
Phones
$54,466
$39,252
69
Japan
Computers
$35,238
$49,587
70
Italy
Cameras
This item has a long comment so it will wrap in the cell.
$69,173
$6,059
71
Greece
Stereos
$49,652
$29,064
72
US
Phones
$31,036
$12,107
73
Germany
Computers
$13,306
$30,625
74
UK
Cameras
$65,562
$17,051
75
Japan
Stereos
This item has a long comment so it will wrap in the cell.
$9,729
$43,896
76
Italy
Phones
$89,214
$32,563
77
Greece
Computers
$26,483
$23,701
78
US
Cameras
$88,758
$24,579
79
Germany
Stereos
$31,971
$18,449
80
UK
Phones
This item has a long comment so it will wrap in the cell.
$99,542
$30,525
81
Japan
Computers
$98,343
$48,090
82
Italy
Cameras
$77,226
$4,564
83
Greece
Stereos
$6,250
$5,503
84
US
Phones
$10,192
$41,991
85
Germany
Computers
This item has a long comment so it will wrap in the cell.
$57,297
$12,082
86
UK
Cameras
$85,958
$22,369
87
Japan
Stereos
$80,317
$23,012
88
Italy
Phones
$77,814
$21,345
89
Greece
Computers
$99,901
$30,447
90
US
Cameras
This item has a long comment so it will wrap in the cell.
$62,384
$49,533
91
Germany
Stereos
$53,954
$6,882
92
UK
Phones
$55,747
$33,610
93
Japan
Computers
$86,617
$16,251
94
Italy
Cameras
$51,996
$41,482
95
Greece
Stereos
This item has a long comment so it will wrap in the cell.
$52,251
$8,145
96
US
Phones
$55,323
$15,731
97
Germany
Computers
$80,063
$23,007
98
UK
Cameras
$33,740
$9,613
99
Japan
Stereos
$66,134
$10,265
100
Italy
Phones
This item has a long comment so it will wrap in the cell.
$50,997
$38,663
101
Greece
Computers
$10,121
$21,933
102
US
Cameras
$85,963
$28,119
103
Germany
Stereos
$64,067
$775
104
UK
Phones
$45,796
$49,671
105
Japan
Computers
This item has a long comment so it will wrap in the cell.
$12,050
$14,160
106
Italy
Cameras
$79,928
$12,781
107
Greece
Stereos
$1,299
$22,289
108
US
Phones
$83,975
$41,161
109
Germany
Computers
$95,156
$10,107
110
UK
Cameras
This item has a long comment so it will wrap in the cell.
$85,174
$44,806
111
Japan
Stereos
$84,434
$17,810
112
Italy
Phones
$30,429
$20,938
113
Greece
Computers
$42,179
$33,144
114
US
Cameras
$93,200
$45,628
115
Germany
Stereos
This item has a long comment so it will wrap in the cell.
$68,051
$17,134
116
UK
Phones
$79,926
$10,845
117
Japan
Computers
$51,965
$43,103
118
Italy
Cameras
$27,091
$24,849
119
Greece
Stereos
$18,802
$13,073
120
US
Phones
This item has a long comment so it will wrap in the cell.
$58,889
$45,403
121
Germany
Computers
$75,680
$39,447
122
UK
Cameras
$10,254
$30,681
123
Japan
Stereos
$57,056
$40,810
124
Italy
Phones
$23,963
$18,874
125
Greece
Computers
This item has a long comment so it will wrap in the cell.
$66,346
$4,050
126
US
Cameras
$99,522
$7,962
127
Germany
Stereos
$6,380
$7,615
128
UK
Phones
$3,634
$16,604
129
Japan
Computers
$51,723
$28,671
130
Italy
Cameras
This item has a long comment so it will wrap in the cell.
$22,430
$5,814
131
Greece
Stereos
$77,552
$41,645
132
US
Phones
$24,030
$8,760
133
Germany
Computers
$17,972
$28,898
134
UK
Cameras
$82,950
$11,435
135
Japan
Stereos
This item has a long comment so it will wrap in the cell.
$4,459
$14,001
136
Italy
Phones
$35,692
$30,373
137
Greece
Computers
$79,427
$9,640
138
US
Cameras
$13,491
$26,255
139
Germany
Stereos
$37,498
$36,023
140
UK
Phones
This item has a long comment so it will wrap in the cell.
$8,532
$29,265
141
Japan
Computers
$77,800
$17,313
142
Italy
Cameras
$70,716
$23,205
143
Greece
Stereos
$83,794
$21,158
144
US
Phones
$40,959
$40,775
145
Germany
Computers
This item has a long comment so it will wrap in the cell.
$75,148
$11,715
146
UK
Cameras
$58,456
$49,588
147
Japan
Stereos
$54,949
$8,016
148
Italy
Phones
$44,322
$21,502
149
Greece
Computers
$5,509
$32,030
150
US
Cameras
This item has a long comment so it will wrap in the cell.
$99,904
$43,266
151
Germany
Stereos
$66,677
$4,720
152
UK
Phones
$68,887
$2,575
153
Japan
Computers
$70,075
$16,872
154
Italy
Cameras
$93,998
$25,949
155
Greece
Stereos
This item has a long comment so it will wrap in the cell.
$51,020
$19,234
156
US
Phones
$52,093
$19,172
157
Germany
Computers
$83,215
$39,521
158
UK
Cameras
$40,479
$26,792
159
Japan
Stereos
$7,422
$16,739
160
Italy
Phones
This item has a long comment so it will wrap in the cell.
$77,647
$32,603
161
Greece
Computers
$23,678
$41,945
162
US
Cameras
$45,106
$37,141
163
Germany
Stereos
$58,861
$3,131
164
UK
Phones
$4,118
$44,190
165
Japan
Computers
This item has a long comment so it will wrap in the cell.
$23,615
$30,475
166
Italy
Cameras
$78,168
$46,651
167
Greece
Stereos
$54,618
$26,708
168
US
Phones
$1,702
$8,344
169
Germany
Computers
$72,604
$13,099
170
UK
Cameras
This item has a long comment so it will wrap in the cell.
$56,767
$30,733
171
Japan
Stereos
$96,619
$46,214
172
Italy
Phones
$99,241
$35,160
173
Greece
Computers
$62,645
$2,957
174
US
Cameras
$65,618
$46,616
175
Germany
Stereos
This item has a long comment so it will wrap in the cell.
$10,800
$39,549
176
UK
Phones
$7,438
$8,432
177
Japan
Computers
$78,366
$14,627
178
Italy
Cameras
$87,089
$11,515
179
Greece
Stereos
$56,632
$10,988
180
US
Phones
This item has a long comment so it will wrap in the cell.
$48,296
$36,251
181
Germany
Computers
$16,256
$1,047
182
UK
Cameras
$46,606
$3,750
183
Japan
Stereos
$96,896
$12,187
184
Italy
Phones
$96,125
$7,761
185
Greece
Computers
This item has a long comment so it will wrap in the cell.
$40,349
$44,500
186
US
Cameras
$93,636
$45,451
187
Germany
Stereos
$16,828
$32,583
188
UK
Phones
$63,223
$39,201
189
Japan
Computers
$31,498
$4,765
190
Italy
Cameras
This item has a long comment so it will wrap in the cell.
$56,746
$21,304
191
Greece
Stereos
$808
$7,175
192
US
Phones
$16,102
$24,681
193
Germany
Computers
$87,286
$32,097
194
UK
Cameras
$94,709
$5,271
195
Japan
Stereos
This item has a long comment so it will wrap in the cell.
$2,002
$41,120
196
Italy
Phones
$52,786
$23,370
197
Greece
Computers
$51,606
$31,498
198
US
Cameras
$29,609
$15,734
199
Germany
Stereos
$38,751
$26,516

Formatting cells

The cssClass property is useful for formatting entire columns. If you have to format specific cells, perhaps based on their content or some other criteria, use the formatItem event instead.

The grid below uses formatItem to add class names to numeric cells so that their style depends on their values.

Country
Product
Sales
Expenses
US
Phones
$81,733
$38,401
Germany
Computers
$20,603
$27,944
UK
Cameras
$44,218
$48,877
Japan
Stereos
$29,191
$23,366
Italy
Phones
$46,951
$49,108
Greece
Computers
$86,237
$49,767
US
Cameras
$31,459
$40,845
Germany
Stereos
$99,190
$1,631
UK
Phones
$52,628
$46,701
Japan
Computers
$54,682
$4,055
Italy
Cameras
$45,333
$14,859
Greece
Stereos
$64,270
$38,148
US
Phones
$38,100
$17,157
Germany
Computers
$50,513
$35,799
UK
Cameras
$27,345
$45,355
Japan
Stereos
$33,716
$22,860
Italy
Phones
$22,131
$20,504
Greece
Computers
$61,983
$24,398
US
Cameras
$87,819
$41,271
Germany
Stereos
$85,822
$33,987
UK
Phones
$21,841
$44,768
Japan
Computers
$8,658
$41,929
Italy
Cameras
$64,412
$41,341
Greece
Stereos
$99,997
$24,068
US
Phones
$71,973
$40,473
Germany
Computers
$72,909
$35,923
UK
Cameras
$90,518
$9,456
Japan
Stereos
$54,080
$16,275
Italy
Phones
$46,840
$41,675
Greece
Computers
$79,363
$38,225
US
Cameras
$29,500
$26,139
Germany
Stereos
$33,259
$14,336
UK
Phones
$22,252
$9,344
Japan
Computers
$62,462
$34,652
Italy
Cameras
$92,764
$11,067
Greece
Stereos
$6,652
$45,005
US
Phones
$9,398
$7,455
Germany
Computers
$60,987
$47,652
UK
Cameras
$14,806
$33,881
Japan
Stereos
$22,540
$30,909
Italy
Phones
$36,094
$42,524
Greece
Computers
$28,165
$35,249
US
Cameras
$98,881
$19,357
Germany
Stereos
$28,033
$25,329
UK
Phones
$5,701
$14,028
Japan
Computers
$84,642
$30,658
Italy
Cameras
$74,233
$20,094
Greece
Stereos
$13,070
$34,983
US
Phones
$83,057
$34,256
Germany
Computers
$17,277
$9,227
UK
Cameras
$25,075
$49,856
Japan
Stereos
$6,344
$13,184
Italy
Phones
$56,809
$32,300
Greece
Computers
$97,013
$3,885
US
Cameras
$15,577
$40,683
Germany
Stereos
$57,539
$27,643
UK
Phones
$99,455
$15,082
Japan
Computers
$46,570
$24,154
Italy
Cameras
$7,169
$11,512
Greece
Stereos
$44,690
$22,554
US
Phones
$38,884
$40,802
Germany
Computers
$91,363
$1,479
UK
Cameras
$96,289
$49,679
Japan
Stereos
$65,352
$13,916
Italy
Phones
$58,779
$38,610
Greece
Computers
$42,043
$48,747
US
Cameras
$97,289
$12,759
Germany
Stereos
$89,725
$8,911
UK
Phones
$54,466
$39,252
Japan
Computers
$35,238
$49,587
Italy
Cameras
$69,173
$6,059
Greece
Stereos
$49,652
$29,064
US
Phones
$31,036
$12,107
Germany
Computers
$13,306
$30,625
UK
Cameras
$65,562
$17,051
Japan
Stereos
$9,729
$43,896
Italy
Phones
$89,214
$32,563
Greece
Computers
$26,483
$23,701
US
Cameras
$88,758
$24,579
Germany
Stereos
$31,971
$18,449
UK
Phones
$99,542
$30,525
Japan
Computers
$98,343
$48,090
Italy
Cameras
$77,226
$4,564
Greece
Stereos
$6,250
$5,503
US
Phones
$10,192
$41,991
Germany
Computers
$57,297
$12,082
UK
Cameras
$85,958
$22,369
Japan
Stereos
$80,317
$23,012
Italy
Phones
$77,814
$21,345
Greece
Computers
$99,901
$30,447
US
Cameras
$62,384
$49,533
Germany
Stereos
$53,954
$6,882
UK
Phones
$55,747
$33,610
Japan
Computers
$86,617
$16,251
Italy
Cameras
$51,996
$41,482
Greece
Stereos
$52,251
$8,145
US
Phones
$55,323
$15,731
Germany
Computers
$80,063
$23,007
UK
Cameras
$33,740
$9,613
Japan
Stereos
$66,134
$10,265
Italy
Phones
$50,997
$38,663
Greece
Computers
$10,121
$21,933
US
Cameras
$85,963
$28,119
Germany
Stereos
$64,067
$775
UK
Phones
$45,796
$49,671
Japan
Computers
$12,050
$14,160
Italy
Cameras
$79,928
$12,781
Greece
Stereos
$1,299
$22,289
US
Phones
$83,975
$41,161
Germany
Computers
$95,156
$10,107
UK
Cameras
$85,174
$44,806
Japan
Stereos
$84,434
$17,810
Italy
Phones
$30,429
$20,938
Greece
Computers
$42,179
$33,144
US
Cameras
$93,200
$45,628
Germany
Stereos
$68,051
$17,134
UK
Phones
$79,926
$10,845
Japan
Computers
$51,965
$43,103
Italy
Cameras
$27,091
$24,849
Greece
Stereos
$18,802
$13,073
US
Phones
$58,889
$45,403
Germany
Computers
$75,680
$39,447
UK
Cameras
$10,254
$30,681
Japan
Stereos
$57,056
$40,810
Italy
Phones
$23,963
$18,874
Greece
Computers
$66,346
$4,050
US
Cameras
$99,522
$7,962
Germany
Stereos
$6,380
$7,615
UK
Phones
$3,634
$16,604
Japan
Computers
$51,723
$28,671
Italy
Cameras
$22,430
$5,814
Greece
Stereos
$77,552
$41,645
US
Phones
$24,030
$8,760
Germany
Computers
$17,972
$28,898
UK
Cameras
$82,950
$11,435
Japan
Stereos
$4,459
$14,001
Italy
Phones
$35,692
$30,373
Greece
Computers
$79,427
$9,640
US
Cameras
$13,491
$26,255
Germany
Stereos
$37,498
$36,023
UK
Phones
$8,532
$29,265
Japan
Computers
$77,800
$17,313
Italy
Cameras
$70,716
$23,205
Greece
Stereos
$83,794
$21,158
US
Phones
$40,959
$40,775
Germany
Computers
$75,148
$11,715
UK
Cameras
$58,456
$49,588
Japan
Stereos
$54,949
$8,016
Italy
Phones
$44,322
$21,502
Greece
Computers
$5,509
$32,030
US
Cameras
$99,904
$43,266
Germany
Stereos
$66,677
$4,720
UK
Phones
$68,887
$2,575
Japan
Computers
$70,075
$16,872
Italy
Cameras
$93,998
$25,949
Greece
Stereos
$51,020
$19,234
US
Phones
$52,093
$19,172
Germany
Computers
$83,215
$39,521
UK
Cameras
$40,479
$26,792
Japan
Stereos
$7,422
$16,739
Italy
Phones
$77,647
$32,603
Greece
Computers
$23,678
$41,945
US
Cameras
$45,106
$37,141
Germany
Stereos
$58,861
$3,131
UK
Phones
$4,118
$44,190
Japan
Computers
$23,615
$30,475
Italy
Cameras
$78,168
$46,651
Greece
Stereos
$54,618
$26,708
US
Phones
$1,702
$8,344
Germany
Computers
$72,604
$13,099
UK
Cameras
$56,767
$30,733
Japan
Stereos
$96,619
$46,214
Italy
Phones
$99,241
$35,160
Greece
Computers
$62,645
$2,957
US
Cameras
$65,618
$46,616
Germany
Stereos
$10,800
$39,549
UK
Phones
$7,438
$8,432
Japan
Computers
$78,366
$14,627
Italy
Cameras
$87,089
$11,515
Greece
Stereos
$56,632
$10,988
US
Phones
$48,296
$36,251
Germany
Computers
$16,256
$1,047
UK
Cameras
$46,606
$3,750
Japan
Stereos
$96,896
$12,187
Italy
Phones
$96,125
$7,761
Greece
Computers
$40,349
$44,500
US
Cameras
$93,636
$45,451
Germany
Stereos
$16,828
$32,583
UK
Phones
$63,223
$39,201
Japan
Computers
$31,498
$4,765
Italy
Cameras
$56,746
$21,304
Greece
Stereos
$808
$7,175
US
Phones
$16,102
$24,681
Germany
Computers
$87,286
$32,097
UK
Cameras
$94,709
$5,271
Japan
Stereos
$2,002
$41,120
Italy
Phones
$52,786
$23,370
Greece
Computers
$51,606
$31,498
US
Cameras
$29,609
$15,734
Germany
Stereos
$38,751
$26,516
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// This file locates: "Scripts/Lesson/C1FlexGrid/ColumnsStyling.js".
c1.documentReady(function () {
    var cv = c1.getService("collectionView");
    for (var i = 0; i < cv.items.length; i++) {
        cv.items[i].Comment = i % 5 == 0 ? 'This item has a long comment so it will wrap in the cell.' : '';
    }
 
    // column properties
    var theGrid = wijmo.Control.getControl('#theGrid');
    theGrid.initialize({
        autoGenerateColumns: false,
        columns: [
            { binding: 'Id', header: 'ID', align: 'center', width: 50 },
            { binding: 'Country', header: 'Country', cssClass: 'cell-country' },
            { binding: 'Product', header: 'Product', cssClass: 'cell-product' },
            { binding: 'Comment', header: 'Comment', wordWrap: true, width: 200 },
            { binding: 'Sales', header: 'Sales', format: 'c0', align: 'center' },
            { binding: 'Expenses', header: 'Expenses', format: 'c0', align: 'center' },
        ],
    });
 
    // call autosizerows to show word-wrapping
    theGrid.autoSizeRows();
 
    // formatItem event
    var theGridFormatItem = wijmo.Control.getControl('#theGridFormatItem');
    theGridFormatItem.initialize({
        autoGenerateColumns: false,
        columns: [
            { binding: 'Country', header: 'Country' },
            { binding: 'Product', header: 'Product' },
            { binding: 'Sales', header: 'Sales', format: 'c0' },
            { binding: 'Expenses', header: 'Expenses', format: 'c0' },
        ],
        formatItem: function (s, e) {
            if (e.panel == s.cells) {
                var value = e.panel.getCellData(e.row, e.col);
                wijmo.toggleClass(e.cell, 'high-value', wijmo.isNumber(value) && value > 60000);
                wijmo.toggleClass(e.cell, 'low-value', wijmo.isNumber(value) && value < 20000);
            }
        }
    });
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// This file locates: "Content/css/Lesson/C1FlexGrid/ColumnsStyling.css".
.wj-flexgrid {
  max-height: 250px;
}
.cell-country {
  font-weight: bold
}
.cell-country:not(.wj-state-selected):not(.wj-state-multi-selected) {
  background-color: #bbff00 !important;
}
.cell-product {
  font-weight: bold;
}
.cell-product:not(.wj-state-selected):not(.wj-state-multi-selected) {
  background-color: #ffbb00 !important;
}
.high-value {
  font-weight: bold;
  color: green;
}
.low-value {
  font-style: italic;
  color: red;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
using System.Web.Mvc;
 
namespace LearnMvcClient.Controllers
{
    public partial class C1FlexGridController : Controller
    {
        // GET: ColumnsStyling
        public ActionResult ColumnsStyling()
        {
            return View(Models.FlexGridData.GetSales(200));
        }
    }
}
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@model IEnumerable<FlexGridData.Sale>
 
<h1>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Title)
</h1>
<p>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text1)
</p>
<ul>
    <li>
        @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text2)
    </li>
    <li>
        @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text3)
    </li>
    <li>
        @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text4)
    </li>
</ul>
<p>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text5)
</p>
<p>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text6)
</p>
@Html.C1().CollectionViewService().Id("collectionView").Bind(Model)
@(Html.C1().FlexGrid().Id("theGrid")
    .ItemsSourceId("collectionView")
    .ShowAlternatingRows(false)
)
 
<h3>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Title1)
</h3>
<p>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text7)
</p>
<p>
    @Html.Raw(Resources.C1FlexGrid.ColumnsStyling_Text8)
</p>
@(Html.C1().FlexGrid().Id("theGridFormatItem")
    .ItemsSourceId("collectionView")
    .ShowAlternatingRows(false)
)