Posted 14 September 2017, 3:02 am EST
Hi,
I am encountering an issue of horizontal scrolling of Flexgrid. I am using formatItem to change cell backcolor base on cell value/colum header. The color changing works fine. When I scroll left or right with by scrollbar on the bottom of the Flexgrid, the color I change to column 1 is also change on other columns which I did not intend to change at all. Scrolling vertically is fine as I expected. Please tell me what have Idone not right. Thank you very much.
<wj-flex-grid #flex
auto-generate-columns=“true”
(formatItem)=“formatItem(flex,$event)”
[itemsSource]=“dataCollection”
[autoSizeMode]=“1”
[headersVisibility]=“1”
[isReadOnly]=“true”>
<wj-flex-grid-filter></wj-flex-grid-filter>
</wj-flex-grid>
formatItem(s: wjGrid.FlexGrid, e: wjGrid.FormatItemEventArgs) {
if(e.panel.cellType == wjGrid.CellType.Cell && e.col == 1) {
e.cell.style.backgroundColor = ‘lightgreen’;
}
}
Thank you very much.