[CLOSED] [#433] Loop through changed PropertyGridParameters

  1. #1

    [CLOSED] [#433] Loop through changed PropertyGridParameters

    I would like to save only those new values in my gridpanel property.

    Having the example bellow, I tried to check param.IsChanged property, but if one parameter of data source is changed, all parameters return this property as true, even if it was not changed.

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">   
        protected void Button1_Click(object sender, DirectEventArgs e)
            StringBuilder html = new StringBuilder();
            html.Append("CHANGED VALUES:</ BR>");
            html.Append("<table class=\"data\">");
            html.Append("<tr><th>Name</th><th>New Value</th></tr>");
            foreach (PropertyGridParameter param in this.PropertyGrid1.Source)
                if (param.IsChanged)
                    html.Append("<td>" + param.Name + "</td>");
                    html.Append("<td>" + param.Value.ToString() + "</td>");
            this.Label1.Html = html.ToString();
    <!DOCTYPE html>
    <head id="Head1" runat="server">
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" /> 
            <ext:PropertyGrid ID="PropertyGrid1" runat="server" Width="300" SortableColumns="false"
                    <ext:PropertyGridParameter Name="(name)" Value="Properties Grid" />
                    <ext:PropertyGridParameter Name="grouping" Value="false" Mode="Raw" />
                    <ext:PropertyGridParameter Name="autoFitColumns" Value="true" Mode="Raw" />
                    <ext:PropertyGridParameter Name="productionQuality" Value="false" Mode="Raw" />
                    <ext:PropertyGridParameter Name="created" Value="10/15/2006">
                            <ext:DateField ID="DateField2" runat="server" Format="MM/dd/yyyy" />
                    <ext:PropertyGridParameter Name="tested" Value="false" Mode="Raw">
                        <Renderer Handler="metadata.tdCls = 'red-label'; return value;" />
                    <ext:PropertyGridParameter Name="version" Value="0.01" EditorType="Number" />
                    <ext:PropertyGridParameter Name="borderWidth" Value="5" Mode="Raw">
                            <ext:NumberField ID="NumberField2" runat="server" />
                    <ext:PropertyGridParameter Name="color" DisplayName="Color" Value="Red">
                            <ext:ComboBox ID="ComboBox2" runat="server" ForceSelection="true">
                                    <ext:ListItem Text="Red" />
                                    <ext:ListItem Text="Green" />
                                    <ext:ListItem Text="Blue" />
                        <Renderer Handler="return Ext.String.format('<span style=\'color: {0};\'>{1}</span>', value.toLowerCase(), value);" />
                    <ext:PropertyGridParameter Name="trigger" Value="TriggerField" DisplayName="Trigger Field">
                        <Renderer Handler="metadata.tdCls = 'blue-label'; 
                                return value;" />
                            <ext:TriggerField ID="TriggerField1" runat="server">
                                    <ext:FieldTrigger Icon="SimpleEllipsis" Tag="ellipsis" />
                                    <TriggerClick Handler="#{PropertyGrid1}.editingPlugin.completeEdit(); 
                                                Ext.Msg.alert('Trigger click', tag + ' trigger click');" />
                    <ext:Button runat="server" ID="Button5" Text="Get Changed Values">
                            <Click OnEvent="Button1_Click" />
            <ext:Label ID="Label1" runat="server" />
    By the way, how can I make bold changed values after edit in client side?

    Last edited by Daniil; Feb 24, 2014 at 3:00 AM. Reason: [CLOSED] [#433]
  2. #2
    Hi @posser,

    Unfortunately, the IsChanged property doesn't work. Created an Issue for that:

    Though, I am not sure when it will be fixed. Therefore I would recommend to go in a different way with some manual work. There is the PropertyChange event which you could use to track the changes.
  3. #3
    Fixed in SVN. Please update and retest
    Vladimir Shcheglov
    Sr. Developer
  4. #4
    It has been fixed the revisions #5678 and #5679 and will go to the v2.5 release.

    Thank you for the report!

Similar Threads

  1. Loop into an existing treepanel
    By springrider in forum 2.x Help
    Replies: 1
    Last Post: May 17, 2012, 3:46 AM
  2. Replies: 4
    Last Post: Dec 02, 2011, 2:42 PM
  3. gridpanel loop
    By maxdiable in forum 1.x Help
    Replies: 4
    Last Post: Jul 09, 2009, 9:37 AM
  4. Replies: 4
    Last Post: May 21, 2009, 12:50 PM
  5. Replies: 3
    Last Post: Dec 10, 2008, 6:32 PM

Tags for this Thread

Posting Permissions