How to hide column in list control
-
Hi all. how can we hide a column in list view. I have to maintain the data in column but that perticular column should not visible to end user.how can i do this..
Technically you cannot hide a column, however you can set its width equal to zero, obtaining the same effect (albeit the user can change it). :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
Technically you cannot hide a column, however you can set its width equal to zero, obtaining the same effect (albeit the user can change it). :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CPallini wrote:
however you can set its width equal to zero,
Pressing 'Ctrl + +' redisplays it. It's the shortcut for auto resizing list control columns, based on it's contents, in windows.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
CPallini wrote:
however you can set its width equal to zero,
Pressing 'Ctrl + +' redisplays it. It's the shortcut for auto resizing list control columns, based on it's contents, in windows.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
I know. If you need to handle this then a more elaborate approach involves overriding
DrawItem
. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
I know. If you need to handle this then a more elaborate approach involves overriding
DrawItem
. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CPallini wrote:
If you need to handle this then a more elaborate approach involves overriding DrawItem.
One way could be to create a virtual list control and just don't give any text to hidden columns(this includes the header for the column), this way windows won't show this column I guess, even when this shortcut is pressed. :~
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
CPallini wrote:
If you need to handle this then a more elaborate approach involves overriding DrawItem.
One way could be to create a virtual list control and just don't give any text to hidden columns(this includes the header for the column), this way windows won't show this column I guess, even when this shortcut is pressed. :~
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
This implies you have to copy data elsewhere. Once you copied data you may just delete the column. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
-
This implies you have to copy data elsewhere. Once you copied data you may just delete the column. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
CPallini wrote:
This implies you have to copy data elsewhere. Once you copied data you may just delete the column.
Yeah that is what I meant by virtual list.
Nibu thomas A Developer Code must be written to be read, not by the compiler, but by another human being. http:\\nibuthomas.wordpress.com
-
Hi all. how can we hide a column in list view. I have to maintain the data in column but that perticular column should not visible to end user.how can i do this..
sheshidar wrote:
...that perticular column should not visible to end user.
Then why bother having it?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
sheshidar wrote:
...that perticular column should not visible to end user.
Then why bother having it?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I have to keep the data in the column, but only thing is end user should not know that there is the column i list.
sheshidar wrote:
I have to keep the data in the column,
But why? There may be another, more elegant, solution.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi all. how can we hide a column in list view. I have to maintain the data in column but that perticular column should not visible to end user.how can i do this..