[CLOSED] Replacing the header values of the property grid with localised header

  1. #1

    [CLOSED] Replacing the header values of the property grid with localised header

    Normally a property grid is used as shown below and the headers will be "Name" and "Value". How do set a different title for the name and value. we localize our application and would like to set these value to the localized version of Name and Value

    
    <ext:PropertyGrid        ID="PropertyGrid1"        runat="server"        Width="300"        AutoHeight="true">        
            <Source>            
            <ext:PropertyGridParameter Name="color" Value="#800080">                
            <Renderer Fn="function (value, metaData) {            metaData.style += 'background-color: ' + value + ';';
                 return value;
             }" />                
            <Editor>                           
            <ext:DropDownField ID="DDFieldEditor" runat="server" Editable="false">                        
            <Component>                            
            <ext:Panel ID="Panel1" runat="server" AutoWidth="true" AutoHeight="true">                                
            <Items>                                    
            <ext:ColorPalette ID="ColorPalette1" runat="server">                                        
            <Listeners>                                            
            <Select Fn="function (cp, color) {
                 DDFieldEditor.setValue('#' + color);
             } "/>                                        
            </Listeners>                                    
            </ext:ColorPalette>                                
            </Items>                            
            </ext:Panel> 
            </Component>                  
            </ext:DropDownField>       
            </Editor>           
            </ext:PropertyGridParameter> 
            <ext:PropertyGridParameter Name="test" Value="test" />        
            </Source>       
            <SelectionModel>           
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />      
             </SelectionModel>    
             </ext:PropertyGrid>
    Last edited by Daniil; Jul 16, 2012 at 10:48 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Setting the Locale
    <ext:ResourceManager runat="server" Locale="it-IT" />
    or CurrentUICulture will automatically localize these properties.
  3. #3
    We do not want to use the localized EXT string. We manage our localization string. How can the values of these string be set manually.
  4. #4
    I can suggest the following solution.

    Example
    <ext:PropertyGrid runat="server" Width="200" AutoHeight="true">
        <Source>
            <ext:PropertyGridParameter Name="Prop1" Value="1" />
            <ext:PropertyGridParameter Name="Prop2" Value="2" />
        </Source>
        <CustomConfig>
            <ext:ConfigItem Name="nameText" Value="My Name" Mode="Value" />
            <ext:ConfigItem Name="valueText" Value="My Value" Mode="Value" />
        </CustomConfig>
        <Listeners>
            <BeforeRender Handler="var cm = this.getColumnModel();
                                            
                                   cm.setColumnHeader(0, this.nameText);
                                   cm.setColumnHeader(1, this.valueText);" />
        </Listeners>
    </ext:PropertyGrid>
  5. #5
    ok. I will try that

Similar Threads

  1. [CLOSED] Grid Header & HeaderMenu
    By softmachine2011 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 18, 2012, 1:28 PM
  2. [CLOSED] Tooltip in the Grid Header
    By majunior in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 02, 2011, 1:59 PM
  3. Replies: 16
    Last Post: Feb 23, 2011, 11:03 AM
  4. Replies: 3
    Last Post: Sep 09, 2010, 7:31 AM
  5. Replies: 9
    Last Post: Apr 27, 2009, 4:19 PM

Tags for this Thread

Posting Permissions