Hi,
How can I use I case for some conditions of SrCode in grid, like
Thanks
Saif
How can I use I case for some conditions of SrCode in grid, like
Code:
With This.parent.parent.ContSrDisp.Grid1
.Width = 1146
.Height = 145
.Top = 84
.Left = 6 && Adjust Grid position
.ColumnCount = 10
.HeaderHeight = 24
.ReadOnly = .T.
.FontName = "Tahoma"
.RecordSource = "SrDisp"
.RecordSourceType = 1
.RowHeight = 24
.DeleteMark = .F.
*.setall("dynamicbackcolor", "IIF(RECNO()%2 = 0,RGB(219,125,27), RGB(255,255,255))", "Column")
.setall("Dynamicbackcolor"=ICASE(SrCode='G30',RGB(255,0,0),SrCode='G10',RGB(0,64,64),SrCode='G23',RGB(255,255,255),RGB(192,192,192)), "Column")
.Visible = .T. && Grid control visible
.ScrollBars = 2
.column1.header1.Caption = 'ItemCode'
.column2.header1.Caption = 'BarCode'
.column3.header1.Caption = 'Item Description'
.column4.header1.Caption = 'Cartons'
.column5.header1.Caption = 'Units'
.column6.header1.Caption = 'Ctn.Rate'
.column7.header1.Caption = 'Unit.Rate'
.column9.header1.Caption = 'Value'
.column8.header1.Caption = 'GrvCode'
.column10.header1.Caption = 'Description'
.column1.header1.Alignment = 2
.column2.header1.Alignment = 2
.column3.header1.Alignment = 2
.column4.header1.Alignment = 2
.column5.header1.Alignment = 2
.column6.header1.Alignment = 2
.column7.header1.Alignment = 2
.column9.header1.Alignment = 2
.column8.header1.Alignment = 2
.column10.header1.Alignment = 2
.column1.Width = 72
.column2.Width = 100
.column3.Width = 240
.column4.Width = 85
.column5.Width = 85
.column6.Width = 72
.column7.Width = 72
.column9.Width = 110
.column8.Width = 53
.column10.Width = 218
.column4.Format = 'Z'
.column5.Format = 'Z'
.column6.Format = 'Z'
.column7.Format = 'Z'
.column9.Format = 'Z'
.column4.InputMask = '999,999.999'
.column5.InputMask = '999,999.999'
.column6.InputMask = '9,999.999'
.column7.InputMask = '9,999.999'
.column9.InputMask = '999,999.99'
.column1.ControlSource = "SrDisp.Icode"
.column2.ControlSource = "SrDisp.BarCode"
.column3.ControlSource = "SrDisp.full_desc"
.column4.ControlSource = "SrDisp.QntyMaj"
.column5.ControlSource = "SrDisp.QntyMin"
.column6.ControlSource = "SrDisp.RateMaj"
.column7.ControlSource = "SrDisp.RateMin"
.column9.ControlSource = "iif(SrDisp.qntymin*SrDisp.ratemin#0,SrDisp.qntymin*SrDisp.ratemin,SrDisp.qntymaj*SrDisp.ratemaj)"
.column9.ControlSource = "SrDisp.amount"
.column8.ControlSource = "SrDisp.SrCode"
.column10.ControlSource = "SrDisp.SrDesc"
Endwith
Thanks
Saif