473,587 Members | 2,527 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview and PropertyGrid on form

Hello,

I maybe asking too much in a single posting, but here it goes:

I building a windows form that mimic's the Outlook XP GUI. Its a three
pane form that will allow a user to view and edit records in a
database. A Treeview in the left pane, a Listview in the TopRight
Pane, and a PropertyGrid in the BottomRight; The Treeview will allow
the user to select an
"Entity" to view, the listview will display a list of instances of
that entity. The propertygrid will display the properties of the
instance(s) selected in the listview.

Barriers:

1) Can I add custom types to the listview control and having the
properties of the customtype appear as item\subitems ? I have seen
code were custom types inherit from ListViewItem, if this is the way
to add a custom type to the listview control, how doyou
populate\displa y the subitems? I am potentially displaying 20
different types(or collections of types) in the listview, do I need to
create a custom listviewitem for each of these types?

2) I can forsee having to create huge if\else or switch\case
statements to handle casting objects from one type to an other.
ListView Items to. I have read postings that suggestion creating an
interface that all custom types will implement, which then would
require you to cast only to the interface.
Are there c# examples of creating\implem enting interfaces with GUI's,
I maybe asking too much .
I apologize if any of the questions are not clear or silly, this is my
first c# application, I have experience using c++Builder but I am new
to c#.

newbie
Nov 15 '05 #1
1 3442
> 1) Can I add custom types to the listview control and having the
properties of the customtype appear as item\subitems ? I have seen
code were custom types inherit from ListViewItem, if this is the way
to add a custom type to the listview control, how doyou
populate\displa y the subitems? I am potentially displaying 20
different types(or collections of types) in the listview, do I need to
create a custom listviewitem for each of these types?
I used the tab property of the ListviewItem to hold my custom types. I
am creating a couple of interfaces that the classes will need to
implement. This should minimize casting. I will cast any object to the
required interface to accomplish the necessary tasks.
ms******@yahoo. com (newbie) wrote in message news:<51******* *************** ****@posting.go ogle.com>... Hello,

I maybe asking too much in a single posting, but here it goes:

I building a windows form that mimic's the Outlook XP GUI. Its a three
pane form that will allow a user to view and edit records in a
database. A Treeview in the left pane, a Listview in the TopRight
Pane, and a PropertyGrid in the BottomRight; The Treeview will allow
the user to select an
"Entity" to view, the listview will display a list of instances of
that entity. The propertygrid will display the properties of the
instance(s) selected in the listview.

Barriers:

1) Can I add custom types to the listview control and having the
properties of the customtype appear as item\subitems ? I have seen
code were custom types inherit from ListViewItem, if this is the way
to add a custom type to the listview control, how doyou
populate\displa y the subitems? I am potentially displaying 20
different types(or collections of types) in the listview, do I need to
create a custom listviewitem for each of these types?

2) I can forsee having to create huge if\else or switch\case
statements to handle casting objects from one type to an other.
ListView Items to. I have read postings that suggestion creating an
interface that all custom types will implement, which then would
require you to cast only to the interface.
Are there c# examples of creating\implem enting interfaces with GUI's,
I maybe asking too much .
I apologize if any of the questions are not clear or silly, this is my
first c# application, I have experience using c++Builder but I am new
to c#.

newbie

Nov 15 '05 #2

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

Similar topics

6
2887
by: Terry | last post by:
I have a very basic program, but for some reason I can't get it to behave properly. What I want is a basic form with a TabControl that fills the entire form. The tab control should have 4 tabs with a single PropertyGrid control on each tab that fills it's parent's tab page's client area. Here's what I did. 1. Create a new project.
3
6039
by: Dave Girvitz | last post by:
I have a PropertyGrid (Windows Forms App) based component that uses TypeConverters to generate ranges of acceptable values for properties. The idea was that I could download the key/value pairs from a database and manipulate the TypeConverters dynamically. The property grid then displays the property with a drop down list. It does work...
3
7309
by: Nicolas | last post by:
I want to display in my application a PropertyGrid showing only the "Appearance" of a control (ie. textBox) so the user can change it. Bare with me, I'm new in csharp. Where do I go from: this.PropertyGrid1.SelectedObject = this.Textbox1; Thank a lot
3
4039
by: Frank Rizzo | last post by:
I added a PropertyGrid control to my form and set its SelectedObject property to one of my objects which exposes a lot of properties of type System.Drawing.Color. The System.Drawing.Color display fine, but they don't have a dropdown where I can select a new color, like in the VS.NET. How can I help the PropertyGrid display dropdowns for...
2
268
by: Rado | last post by:
Hello. How Can I make listview such as is a bottom of visual studio. Thank you.
4
3068
by: Bernie Yaeger | last post by:
How can I set the browsableattributes of the control that has been selected (selectedobject) by the propertygrid? Here's what I'm after - I want to open a form with a propertygrid in it. The selectedobject will be the form itself. I want the user to change certain properties, thus changing the form. This works fine, but what I really want...
2
4832
by: Lance | last post by:
I want to be able to reset a complex property in a PropertyGrid. I know that for properties that are ValueTypes you can include System.ComponentModel.DefaultValue in the declaration of the property. But, for complex property types (e.g., instance types) this does not work because System.ComponentModel.DefaultValue requires a constant value In...
6
6927
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
2
7935
by: Marco Segurini | last post by:
Hi All, I have a form containing only a PropertyGrid that I use to modify an instance of the following class: class MyClass { Point _point = new Point();
0
8206
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. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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...
0
8220
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...
0
6621
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...
0
5392
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...
0
3840
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.