|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hide 2 fields in Listview box from user
I would like to know if there is a way to only display one item is a listview box, and make the other 2 items invisible to the user. The other 2 items are needed to create a query string. But I want the user to see the one word description of the field. The fieldname, rep_caption, and fieldid are displayed. I would like the user to only see the rep_caption.
Here is the code for the operation: '----fill in the field list With lvwGuardian .ListItems.Clear .ColumnHeaders.Clear .View = lvwReport .ColumnHeaders.Add , , "Field", 0 .ColumnHeaders.Add , , "Field", 1500 .ColumnHeaders.Add , , "Order", 500 .ColumnHeaders.Add , , "ID", 0 .MultiSelect = False .HideSelection = False .AllowColumnReorder = False .FullRowSelect = True .LabelEdit = lvwManual .DragMode = vbManual rsTemp.Open "SELECT fieldid, fieldname, rep_caption, fieldorder, allowgroup, allowsort FROM rep_fields where alias like 'guardian%' or alias like 'x%' order by fieldorder", gcnData, adOpenForwardOnly, adLockReadOnly Do While Not rsTemp.EOF Set itm = .ListItems.Add(, , Trim(rsTemp.Fields("fieldname").value)) itm.ListSubItems.Add , , Trim(rsTemp.Fields("rep_caption").value & "") itm.ListSubItems.Add , , intCount itm.ListSubItems.Add , , rsTemp.Fields("fieldid").value intCount = intCount + 1 '----Store the fields that can't be grouped by If Trim(rsTemp.Fields("allowgroup").value) = "N" Then ReDim Preserve mstrNoGroupBy(intGroup) mstrNoGroupBy(intGroup) = Trim(rsTemp.Fields("fieldname").value) intGroup = intGroup + 1 End If '----Store the fields that can't be sorted by If Trim(rsTemp.Fields("allowsort").value) = "N" Then ReDim Preserve mstrNoSortBy(intSort) mstrNoSortBy(intSort) = Trim(rsTemp.Fields("fieldname").value) intSort = intSort + 1 End If rsTemp.MoveNext Loop End With |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Hide 2 fields in Listview box from user |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|