how to show combobox in the PropertyGrid?

Page 2 of 2 FirstFirst 12
  1. #11
    I got the dll, thanks.

    Adding these JavaScript scripts to the page appears to help.
    http://docs.sencha.com/extjs/4.2.1/s...-property-Grid
    http://docs.sencha.com/extjs/4.2.1/s...eaderContainer
  2. #12
    Quote Originally Posted by Daniil View Post
    I got the dll, thanks.

    Adding these JavaScript scripts to the page appears to help.
    http://docs.sencha.com/extjs/4.2.1/s...-property-Grid
    http://docs.sencha.com/extjs/4.2.1/s...eaderContainer
    Yeah Daniil works!, I don't understand why but works :-), I guess that 2.2 version includes this files, this workaround is enough for me.

    Thank you very much.

    Horace
    Last edited by heps2002; May 28, 2013 at 7:08 PM.
  3. #13
    Hello Daniil

    After to add the javascript files, the click DirectEvent for button "Save", fires the event but don't pass the updated values (I change the ComboBox from Red to Green, but when click "Save" button the table below always show Red.), so the workaround not works complete.

    I have tried to get the parameters values in client-side, where the values are updated, but I can't get the CustomConfig ConfigItem "AdditionalInfo" for a value that I need to process.

    <ext:PropertyGridParameter Name="created" Value="10/15/2006">
         <CustomConfig><ext:ConfigItem Name="AdditionalInfo" Value="SomeValue" /></CustomConfig>
    
         <Editor>
              <ext:DateField ID="DateField1" runat="server" Format="MM/dd/yyyy" />
         </Editor>
    </ext:PropertyGridParameter>
    Last edited by heps2002; May 28, 2013 at 9:44 PM.
  4. #14
    I forgot that we have our own override for a PropertyGrid and it gets reset due to those overrides.

    So, add the following after those scripts.

    Ext.grid.property.Grid.override({
        editable : true,
            
        getDataField : function () {
            if (!this.dataField) {
                this.dataField = new Ext.form.Hidden({ name : this.id });
    
                this.on("beforedestroy", function () { 
                    if (this.rendered) {
                        this.destroy();
                    }
                }, this.dataField);
            }
            
            return this.dataField;
        },
    
        initComponent : function () {
            this.callParent(arguments);
            
            this.propertyNames = this.propertyNames || [];
            
            if (!this.editable) {
                this.on("beforeedit", function () {
                    return false;
                });
            }
            
            this.on("propertychange", function (source) {
                this.saveSource(source);
            });
        },
    
        afterRender : function () {
            this.callParent(arguments);
            if (this.hasId()) {
                this.getDataField().render(this.el.parent() || this.el);
            }
        },
    
        saveSource : function (source) {
            if (this.hasId()) {
                this.getDataField().setValue(Ext.encode(source || this.propStore.getSource()));
            }
        },
    
        setProperty : function (prop, value, create) {
            this.callParent(arguments);
            if (create) {
                this.saveSource(); 
            }
        },
        
        removeProperty : function (prop) {
            this.callParent(arguments);
            this.saveSource(); 
        }
    });
  5. #15
    Hello Daniil

    Not work, I have added the code, but the Click DirectEvent gets the original values not updated values.

    For Each param As PropertyGridParameter In PropertyGrid1.Source
        Console.Write(param.Value.ToString()) ' <--The param.Value show the original value, not the edited value
    Next
    I'm trying in the client-side and I got the updated values, but I don't know how to send the values to the server, I have tried with Store params, but the same issue, in the code-behind the store parameters, show the original parameter values, not the modified values. (I think that related to http://forums.ext.net/showthread.php...t=setBaseParam , but that workaround not work more)

    <ext:Store ID="stoMaster" runat="server">
            <Parameters>
                <ext:StoreParameter Name="Condition" Value="1=1" />
            </Parameters>
    </ext:Store>
    for (var prop in propgrid.getSource()) {
            App.stoMaster.lastOptions.params.Condition = propgrid.getSource()[prop]
    }
    I'm close to throwing in the towel :-), thanks for your help.
    Last edited by heps2002; May 30, 2013 at 6:34 AM.
  6. #16
    Quote Originally Posted by heps2002 View Post
    Not work, I have added the code, but the Click DirectEvent gets the original values not updated values.
    It appears to be working for me. I tested with our example. Please provide your test case. Is there a <form> on your page?
  7. #17
    Hello Daniil

    Sorry for the delay, I have checked and not work, but I have used a new strategy in the client-side and passing the result with extra parameter.

    Thank you for the help, Ext.Net is a really great work!

    Horace
  8. #18
    Thank you for the kind words!
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 0
    Last Post: Apr 19, 2012, 3:53 PM
  2. [CLOSED] PropertyGrid with combobox editor
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 14, 2012, 11:16 PM
  3. [CLOSED] PropertyGrid Combobox
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 27, 2011, 6:56 PM
  4. [CLOSED] Combobox in PropertyGrid
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 07, 2011, 4:19 PM
  5. Replies: 2
    Last Post: Apr 01, 2010, 2:20 PM

Tags for this Thread

Posting Permissions