Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksHow to localize the column headers of a nested datagrid?How to localize the column headers of a nested datagrid?
Previous
 
Next
New Post
8/15/2006 11:24 AM
 
 Hi all,

 I am trying to localize the columns headers of a datagrid nested in a datalist.

 I populate the datagrid via code like this in the datagrid tag…

 DataSource='<%# GetList(DataBinder.Eval(Container.DataItem, "ItemID")) %>'

 Then I try and localize the grid with code like this in the GetList fuction…

 Dim dgIssueViewList As New System.Web.UI.WebControls.DataGrid

  'Localize the Data Grid
Localization.LocalizeDataGrid(dgIssueViewList,Me.LocalResourceFile)

 Finally I have items like ColumnHeaderText.Header in the resx file.

There are no problems with syntax or compilation – it just doesn’t work.

 May I have your thoughts on this one, please?

Thanks

Geoffrey


Geoffrey Morton-Haworth www.yalaworld.net
 
New Post
8/17/2006 8:53 AM
 
I have now found an answer with...

<asp:DataGrid id="dgIssueViewList"  onitemdatabound="dgIssueViewList_ItemDataBound" etc

Then...

Public Sub dgIssueViewList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgIssueViewList.ItemDataBound

            'Localize the dgIssueViewList Column Headers
            If e.Item.ItemType = ListItemType.Header Then
                e.Item.Cells(1).Text = Localization.GetString("Issue", LocalResourceFile)
                e.Item.Cells(4).Text = Localization.GetString("View", LocalResourceFile)
                e.Item.Cells(5).Text = Localization.GetString("Comment", LocalResourceFile)
            End If

        End Sub

And...

#Region "Controls"

        Protected WithEvents dgIssueViewList As System.Web.UI.WebControls.DataGrid

#End Region



But why is the onitemdatabound property not visible in the property editor, I wonder?

Hope this helps someone else

Geoffrey

Geoffrey Morton-Haworth www.yalaworld.net
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksHow to localize the column headers of a nested datagrid?How to localize the column headers of a nested datagrid?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out