[CLOSED] locale support in Grid

  1. #1

    [CLOSED] locale support in Grid

    How can I add locale support to the Grid? I configured the Scriptmanager to use localization but there are some parts of the Grid which must be set from outside, like column header names. How can I set them in the aspx file?


    <ext:GridPanel ID="TypeLanguageGrid" runat="server" StoreID="_storeTypeLanguage" AutoScroll="True" ButtonAlign="Center" ClicksToEdit="2" StripeRows="True" TrackMouseOver="True">
                            <ColumnModel ID="TypeLanguageColumnModel" runat="server">
                                <Columns>
                                    <ext:Column ColumnID="ID" Header="ID" DataIndex="ID" Hidden="True" />
                                    <ext:Column ColumnID="Name" Header="Name" DataIndex="Name">
                                        <Editor>
                                            <ext:TextField ID="_editColName" runat="server" AllowBlank="False" />
                                        </Editor>
                                    </ext:Column>
                                    <ext:Column ColumnID="ShortName" Header="ShortName" DataIndex="ShortName">
                                        <Editor>
                                            <ext:TextField ID="_editColShortName" runat="server" AllowBlank="False" />
                                        </Editor>
                                    </ext:Column>
                                </Columns>
                            </ColumnModel>
    Simple setting the header like
    <ext:Column ColumnID="ShortName" Header="<%=Global.Rm.GetString("ShortName") %>" DataIndex="ShortName">
    will fail with an error.

    Setting the text in code behind is rather unsafe because you can access the columns only by index and not by name (I don't mind setting the text in code behind if I can do it by name).

    Do you have any suggestions/guidelines for that case?

    thx,
    Peter
  2. #2

    RE: [CLOSED] locale support in Grid

    Hi,

    Use <%# ... %> instead <%= ... %>
    Ans set AutoDataBind="true" for Column


    <ext:Column AutoDataBind="true"Header='<%# GetHeader("Company") %>' DataIndex="company" />

Similar Threads

  1. [CLOSED] Locale problem
    By thchuong in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 12, 2011, 1:28 AM
  2. Replies: 1
    Last Post: Nov 22, 2010, 9:07 AM
  3. Locale
    By flaviodamaia in forum 1.x Help
    Replies: 0
    Last Post: Jul 08, 2010, 12:25 PM
  4. [CLOSED] Locale Issue
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 27, 2009, 4:49 AM
  5. [CLOSED] Keyboard support in navigating Editor Grid Panel
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 15, 2009, 4:14 PM

Posting Permissions