Hi,
I am working on a simple grid in VB.NET.
I have 2 UDF's:
- U_HandOver (which I turned into a column of checkboxes)
- U_HOV, (which is a column of EditText)
Each time we tick a checkbox, the number 1 should appear in the same row in column U_HOV .
My next step is to achieve the foll. aim:
- When we tick any checkbox, the number 1 should appear in U_HOV.
- When we tick a 2nd checkbox (anyone), the number 2 should appear.
- When we tick a 3rd checkbox,(any other one), the number 3 should appear.
- etc, etc
Hence, as we tick each required checkbox, U_HOV will be numbered in the sequence in which the checkboxes are ticked.
Ideally, if we untick any checkbox, the number on that row should disappear.
Why I want to do this?
In a next stage, I will sort the rows in order in which they are ticked.
It's an application for the Handing over of documents from Store to Accts Dept.
So this trick will remove the necessity of having to sort the documents manually before handing over.
I am short of ideas how to do this?
Anybody can give ideas and/or codes?
My basic code for the click event is as foll:How to modify?
Thanks
Leon Lai
----------------------
If FormUID = "frmGrid" And pVal.BeforeAction = False _
And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK _
And pVal.ItemUID = "MyGrid" _
And pVal.ColUID = "U_HandOver" Then
Dim oGridRow As Integer = pVal.Row
If oGrid.DataTable.GetValue("U_HandOver", oGrid.GetDataTableRowIndex(pVal.Row)).ToString() = "Y" Then
oGrid.DataTable.SetValue("U_HOV", oGrid.GetDataTableRowIndex(pVal.Row), 1)
'
End If
End If