|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hide some columns of listviewYou can´t really, or not easily (you should have to set the width to 0 and
prevent the user resizing it with some API calls/notifications). If you need to hold extra data for each listitem that you don´t want to show, you can create a class that derives from ListViewItem, add the extra property, create instances of it, and add them to the listview. -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Li Pang" <LiP***@discussions.microsoft.com> escribió en el mensaje news:57082078-BB04-4DB5-A688-C072073C3531@microsoft.com... > Hi, > > I want to know how to hide a column of listview. > Thanks in advance A simpler way is to create a class/structure to hold the data and then store
instances of that class in the ListViewItem.Tag property /claes Show quoteHide quote "Carlos J. Quintero [VB MVP]" <carlosq@NOSPAMsogecable.com> wrote in message news:uPBbOyOSGHA.4600@TK2MSFTNGP11.phx.gbl... > You can´t really, or not easily (you should have to set the width to 0 and > prevent the user resizing it with some API calls/notifications). If you > need to hold extra data for each listitem that you don´t want to show, you > can create a class that derives from ListViewItem, add the extra property, > create instances of it, and add them to the listview. > > -- > > Best regards, > > Carlos J. Quintero > > MZ-Tools: Productivity add-ins for Visual Studio > You can code, design and document much faster: > http://www.mztools.com > > > "Li Pang" <LiP***@discussions.microsoft.com> escribió en el mensaje > news:57082078-BB04-4DB5-A688-C072073C3531@microsoft.com... >> Hi, >> >> I want to know how to hide a column of listview. >> Thanks in advance > > Hi Claes,
I don´t like to store things in the Tag property because it is not clear what that bag can contain since it is declared as Object and if you have to declare a separate class anyway to hold the data (more than one value) it is better to use inheritance, IMO. -- Show quoteHide quoteBest regards, Carlos J. Quintero MZ-Tools: Productivity add-ins for Visual Studio You can code, design and document much faster: http://www.mztools.com "Claes Bergefall" <claes.bergefall@nospam.nospam> escribió en el mensaje news:e2hBEtQSGHA.1572@tk2msftngp13.phx.gbl... >A simpler way is to create a class/structure to hold the data and then >store instances of that class in the ListViewItem.Tag property > > /claes
exe/dll as scheduled task
Access, OLE & VB.NET How To Cancel Edits on a control? Setting Foreground Color Property at Row Level in Datagrid I can't find the error here.... Serial Date Stored procedure handling 1 parent record and multiple child recor vb.net to c# conversion help please How Many SQL Connections Should I Use? Name 'ADODB' is not declared Error |
|||||||||||||||||||||||