Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Preventing users from adding items in ArrayEditor

Reply
Thread Tools

Preventing users from adding items in ArrayEditor

 
 
brik
Guest
Posts: n/a
 
      10-25-2004
I've been trying to implement a way to edit a property (containing an
Array of private objects) on a webcontrol at design-time ... my first
shot actually works quite fine; the editor shows the two objects and
i'm able to edit their content.
BUT ... I don't want the user to be able to add/delete objects in the
editor. Is there no way to prohibit this ?

My code :
public class myClass : Object
{
private int no;
public int Number { get{ return no; } set{ number = value; } }
public myClass(int aNumber) { no = aNumber; }
public override string ToString() { return no.ToString(); }
}

[...]
private myClass[] myarray = new myClass [] {new myClass (1), new
myClass (2)};

[Category("Appearance"),
PersistenceMode(PersistenceMode.Default),
EditorAttribute(typeof(System.ComponentModel.Desig n.ArrayEditor),
typeof(System.Drawing.Design.UITypeEditor)) ]
public myClass[] TestArray
{
get { return myarray; }
set { myarray = value; )
}
[...]
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List Box : help preventing duplicate items arkgroup ASP .Net Web Controls 5 11-14-2006 05:03 PM
Preventing users from adding items in ArrayEditor brik ASP .Net Building Controls 0 10-25-2004 06:55 PM
preventing users from dropping wireless onto the lan jim Wireless Networking 3 08-31-2004 07:33 PM
System.ComponentModel.Design.ArrayEditor - How to Peter Ehli ASP .Net Building Controls 4 08-20-2004 03:53 PM
Preventing users from accessing Cisco PDM lombardi Cisco 1 04-13-2004 06:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57