Highlight Demand  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Highlight Demand

Postby 2can2 » Tue May 19, 2015 6:35 pm

Hi, You created a sample plugin for me for Non Physical items to use demand.
I would like to now be able to highlight this if > 0, code in V6 was :
'Sales Orders Entry - ADD TO 'Form GridLines Displayed'
' Demand >0 Highlight Red ONLY if Unprocessed - DH
With FormObject.grdLines
.BlockMode = True
.Col = .GetColFromID(UCase("QuantityDemand"))
.Col2 = .Col
.Row = Row
.Row2 = Row
If SalesOrderLineObject Is Nothing Then
.BackColor = vbWhite
Else
If SalesOrderLineObject.QuantityDemand = 0 Then
.BackColor = vbWhite
Else
.BackColor = vbRed
End If
End If
End With
Can you give me some pointers to add in V7! Thanks
2can2
Frequent Contributor
Frequent Contributor
 
Posts: 171
Joined: Tue Feb 26, 2008 10:24 am
Topics Solved: 25

Re: Highlight Demand  Topic is solved

Postby Scott.Pearce » Wed May 20, 2015 11:18 am

The v7 equivalent code would be:

Code: Select all
If salesOrderLine.QuantityDemand > 0 Then
   salesOrderForm.grdLines.ActiveSheet.Cells(row, salesOrderForm.grdLines.ActiveSheet.Columns("QuantityDemand").Index).BackColor = System.Drawing.Color.Red
Else
   salesOrderForm.grdLines.ActiveSheet.Cells(row, salesOrderForm.grdLines.ActiveSheet.Columns("QuantityDemand").Index).BackColor = System.Drawing.Color.White
End If   


Looking at the sample plugin you mentioned (which I assume is the one at http://forums.jiwa.com.au/viewtopic.php ... p=991#p991), I think the above code would go *below* where the "QuantityDemand" gets unlocked (line 37).
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Highlight Demand

Postby 2can2 » Tue Jun 02, 2015 11:59 am

Thanks Scott. Works a treat!
2can2
Frequent Contributor
Frequent Contributor
 
Posts: 171
Joined: Tue Feb 26, 2008 10:24 am
Topics Solved: 25


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests