What I think you want to do is set the Flags attribute on your enum list, and then add another item to it:
[Flags]
public enum JSFunctions
{
None=0,
OnChange=1,
OnClick=2,
OnKeyUp=4,
OnKeyDown=8,
Onhelp=16,
Onblur=32,
Onfocus=64,
Ondblclick=128,
onmousedown=256,
onmousemove=512,
onmouseup=1024,
onmouseout=2048,
OnChange_OnKeyUp=4096,
OnChange_OnKeyDown=8192,
OnChange_Onblur=16384,
All=32768
}
At that point, you can set multiple enum values to your EventList property like this:
this.EventList &= (JSFunctions.OnKeyUp & JSFunctions.Onhelp);
At this point, all you have to do to set the control's EventList property is to write a method that builds a string from the flags.
private string GetFlagIfSet(JSFunctions jsfuncs, JSFunction func)
{
string flagName = "";
if (jsfuncs != JSFunction.None)
{
if ((jsFuncs | func) == func)
{
flagName = string.Format("{0};", func.ToString());
}
}
return flagName;
}
I'll leave the rest for you to fill in (and keep in mind I did this off the top of my head, so it may need some tweaking).
Go forth and code.