I created a website in three languages: English, Portuguese and Spanish.
Everything works fine, except for one thing: it did not update BoundField when an underlined word was loaded into it.
Below is a field that is not updated in gridview in MEMGridView.ascx:
<asp:BoundField DataField="Ocupacao" HeaderText="Ocupação" SortExpression="Ocupação" meta:resourcekey="BoundFieldResource9"> <ItemStyle HorizontalAlign="Center" /> </asp:BoundField>
There are three files in App_LocalResources with the following values:
- MEMGridView.ascx.resx (English by default) - BoundFieldResource9.HeaderText - "Fill Rate"
- MEMGridView.ascx.pt-BR.resx - BoundFieldResource9.HeaderText - "Ocupação"
- MEMGridView.ascx.es.resx - BoundFieldResource9.HeaderText - "Occupation"
When the page loads for the first time, it shows "Fill Rate" . Then I change the language to Spanish and it shows "Ocupación" . If I return to load the page in English, it will update all the fields except those highlighted. Therefore, he continues to show "Ocupación" instead of "Fill Rate" .
I have no clue about what might happen.
- Update - Additional Information -
MEMGridView is a UserControl inside DashBoard.aspx. Each time someone changes the language value in ddlLanguage (drop-down list) or clicks the Refresh button, a postback is created.
This is a MEMGridView event designed to update fields (in fact, it updates all fields except selected ones).
public partial class MEMGridView : UserControl { ... protected override void FrameworkInitialize() { if (!string.IsNullOrEmpty(Request["ddlLanguage"])) { string str = Request["ddlLanguage"];
source share