View Full Version : PropertyGrid needs at least one item hard coded in the markup otherwise won't add new items on DirectEvent

Jun 06, 2012, 1:37 PM
Hi, if I create a simple PropertyGrid and try to add items using DirecEvent it won't work if at least one item exists in the markup, could you please check my code? Btw, I found some working solutions in the forum but when I use them the editor does not work.

<ext:PropertyGrid ID="PropertyGrid1" Border="false" runat="server" AutoWidth="true" AutoHeight="true" Shim="True" StripeRows="True">
<ext:PropertyGridParameter Name="" Value="" Mode="Value" />
<ext:GridView ID="GridView2" ForceFit="true" runat="server" />

for (int i = 0; i < 15; i++) {
PropertyGridParameter param = new PropertyGridParameter();
param.Name = i.ToString();
param.DisplayName = "Param " + (i + 1).ToString();
param.Value = Guid.NewGuid().ToString();

TriggerField trig = new TriggerField();
trig.Editable = false;
FieldTrigger fltrig = new FieldTrigger();
fltrig.Icon = TriggerIcon.SimpleEllipsis;
trig.Listeners.TriggerClick.Handler = "alert('clicked me');";

//this.PropertyGrid1.SetSource(this.PropertyGrid1.So urce);