473,387 Members | 3,787 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Simple string list in a property grid

Hi,

I'm trying to display a list of string in the string collection editor
just like the "items" property of an ListBox in VS IDE....

I can find many examples on the net but I cant find any example like
items property of a listbox... I mean the String collection editor
with the text "Enter the strings in the collection (on per line)"

Is anybody can point me to the right object to use to define my string
collection object and/or a way to show the string collection editor
like ListBox items ??

Thanks,
Jul 18 '08 #1
2 7794
To get that exact editor you need to apply the attribute:
[Editor("System.Windows.Forms.Design.ListControlStr ingCollectionEditor,
System.Design, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]

to the property, that however generates code like this:

this.listBox1.Items.AddRange(new object[] {
"sdfg",
"wef",
"wef",
"wef",
"wefwef",
"wef"});

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"michelqa" wrote:
Hi,

I'm trying to display a list of string in the string collection editor
just like the "items" property of an ListBox in VS IDE....

I can find many examples on the net but I cant find any example like
items property of a listbox... I mean the String collection editor
with the text "Enter the strings in the collection (on per line)"

Is anybody can point me to the right object to use to define my string
collection object and/or a way to show the string collection editor
like ListBox items ??

Thanks,
Jul 19 '08 #2
THANKS!!!!!!!!!!!!!!!!

after loosing hours trying to find how to do this it finally works!!

Thanks again!

Jul 19 '08 #3

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

Similar topics

0
by: Tal Sharfi | last post by:
Hi everyone I recently had the need for StringGrid object same as the one that Delphi has. An object that helps show lists of other objects in a simple grid. I searched the news groups and...
3
by: Elliot Rodriguez | last post by:
Hi: I am writing a WinForm app that contains a DataGrid control and a StatusBar control. My goal is to update the status bar using events from a separate class, as well as some other simple...
2
by: Steve | last post by:
I'm in a weird situation where I'm using ComboBox's in a DataGrid. When the ComboBox selection changes, I'm currently storing the SelectedValue object into the DataSource of the DataGrid cell. ...
0
by: Daniel Sélen Secches | last post by:
I found a good class to do a simple FTP. Very good.... I'm posting it with the message, i hope it helps someone ============================================================== Imports...
13
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql...
0
by: serge calderara | last post by:
Dear all, I have an application which collect information from a database and display them in a dagrid. I have apply to the grid a DataView object to get filtered information and bind the grid...
3
by: cowznofsky | last post by:
I'm getting data in a generic list class, which I'm not going to change. I would like to use it as a datasource for a datagrid or a gridview, but it doesn't implement IEnumerable. I'm...
3
by: michelqa | last post by:
Hi, I have a form with a control..(a button for example). Then the control properties are displayed in a propertyGrid control. Is there any simple way to remove some unwanted properties from...
0
by: Kevinst | last post by:
Hi! Let's say I wanted to create a very simple control that is nothing but a LED. That LED can be active or inactive. Depending on that state its color changes. What is WPFs best practice to do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.