.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 16th, 2005, 02:18 PM
zombie_man23 zombie_man23 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 22 zombie_man23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 16 m
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Hide 2 fields in Listview box from user


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT