473,789 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview question

I have list view with 5 listview items and I want to show the first
show to the user but user should not able to select the rows, it is
should be already selected and checked, but user should not unselect
it or uncheck it. Is it possible to do that with the listview?
Thanks.

May 2 '07 #1
4 1763
Hi,

What if you make Enabled = false ?
"DBC User" <db*****@gmail. comwrote in message
news:11******** **************@ c35g2000hsg.goo glegroups.com.. .
>I have list view with 5 listview items and I want to show the first
show to the user but user should not able to select the rows, it is
should be already selected and checked, but user should not unselect
it or uncheck it. Is it possible to do that with the listview?
Thanks.

May 2 '07 #2
On May 2, 10:23 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
Hi,

What if you make Enabled = false ?

"DBC User" <dbcu...@gmail. comwrote in message

news:11******** **************@ c35g2000hsg.goo glegroups.com.. .
I have list view with 5 listview items and I want to show the first
show to the user but user should not able to select the rows, it is
should be already selected and checked, but user should not unselect
it or uncheck it. Is it possible to do that with the listview?
Thanks.- Hide quoted text -

- Show quoted text -
Thanks I will try that.

May 2 '07 #3
On May 2, 10:23 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
Hi,

What if you make Enabled = false ?

"DBC User" <dbcu...@gmail. comwrote in message

news:11******** **************@ c35g2000hsg.goo glegroups.com.. .
I have list view with 5 listview items and I want to show the first
show to the user but user should not able to select the rows, it is
should be already selected and checked, but user should not unselect
it or uncheck it. Is it possible to do that with the listview?
Thanks.- Hide quoted text -

- Show quoted text -
ListViewItem doesn't have enable property.
Thanks.

May 3 '07 #4
You could use the API function EnableWindow to disable the window

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExte nsions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensio ns.Net : Develop all shell extensions,expl orer bars and BHOs
rapidly in .Net
---------
"DBC User" <db*****@gmail. comwrote in message
news:11******** **************@ n76g2000hsh.goo glegroups.com.. .
On May 2, 10:23 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions .comwrote:
>Hi,

What if you make Enabled = false ?

"DBC User" <dbcu...@gmail. comwrote in message

news:11******* *************** @c35g2000hsg.go oglegroups.com. ..
>I have list view with 5 listview items and I want to show the first
show to the user but user should not able to select the rows, it is
should be already selected and checked, but user should not unselect
it or uncheck it. Is it possible to do that with the listview?
Thanks.- Hide quoted text -

- Show quoted text -

ListViewItem doesn't have enable property.
Thanks.

May 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2816
by: andrewcw | last post by:
I have a simple winform with the following code. But although I can read back the info, the display fails to provide the text or the cell background color changes. private void ListViewBroke() { listView.View = View.Details; ArrayList LVcolTitles= new ArrayList(); LVcolTitles.Add("Drive"); LVcolTitles.Add("Cust");
1
787
by: J_Max | last post by:
Hello, This might be a really easy question, but... I am developing a simple Smart Device application that uses a listview. I have a function that adds a item to the listview - code is below. I use the type listviewitem, selitem, on one form to modify the listviewitem, using a timer, every second, and use selitem1 to modify items, after they have ended the time on the timer form, from the form that the listview is located - this way I...
7
6451
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override ListView.Items.Add(), . I see that it is a virtual method so it should be easy to do. If anyone can help I would appreciate it greatly. I can do what I need to do in a different way this would just make everything significantly cleaner and eaasier...
3
9319
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve the same results as I get with CheckListBox(s), where I am able to select (Check-mark) various checkboxs items and able to alter the data. I do...
1
1434
by: Derck | last post by:
SORRY, for the crosspost, but I think I posted it in the wrong group! Hello all, I have a question.. I am tying to make a global listview class where other listviews in my application points to, so when I change something in that listview all listviews who points to that listview must be updated.. But I don't have a idea why it isn't working.. I tried to make a singeton listview class and get a instance on the form
12
7488
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on the overall size of the listview. My question therefore is, how can I tell if the items I have added will fit in the listview at its given height? A secondary one, just for interest sake...is there a way to determine the exact heght needed...
1
2859
by: Chris | last post by:
Hi all, I posted the following in microsoft.public.dotnet.framework.windowsforms but it seems that group has little traffic. Hi all, I have a listview box which is populated from methods of objects stored in a List<T> collection. The items in this collection are generated from a user filled out form. The items in the listview have the same index as the ones in List<T>, so I
12
3414
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. Very simple. I would like to create listviewitem's for display in a listview control. The listview items need to contain properties from Internet Explorer windows i've managed to collect into an arraylist.
1
2181
by: =?Utf-8?B?THluYkBtcy5jb20=?= | last post by:
I have a executable winforms application I would like to change. I use quite a number of listview controls in my main form. I dump about 15 columns of data into a couple of listviews. This data comes from classes that implement Ienumerable ... I use a method in the main form to update the listviews... s. I want to change this application to Only to show 4 columns of data (new data)
5
9539
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting IEnumerable<to the ListView's Datasource property. This all works fine to display the first 3 items (the DataPager is set to display three items at a time), but when I click on the next page in the DataPager...nothing happens. There's a roundtrip to the...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10410
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.