[CLOSED] Grid Panel Column Headers - Special Characters

  1. #1

    [CLOSED] Grid Panel Column Headers - Special Characters

    Hi,

    I have special characters in column headers of my Gridpanel. When we have "." in the column header, it is throwing a ext.net error. Have posted sample code below.

    <!--Designer code-->
      <ext:Store runat="server" ID="StData">
        <Reader>
            <ext:JsonReader>
                <Fields>
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
        <ext:GridPanel runat="server" StoreID="StData" ID="grdData" Height="400">
            <ColumnModel>
                <Columns>
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
    
    <!--Code Behind-->
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not IsPostBack Then
                Dim dt As New DataTable
                dt.Columns.Add("A/B")
                dt.Columns.Add("A%B")
                dt.Columns.Add("Grand-Prix-of-St.-Petersb-2012")
               
                Dim dr As DataRow = dt.NewRow()
                dr(0) = "12.23"
                dr(1) = "23.34"
                dr(2) = "3"
                dt.Rows.Add(dr)
                For Each dCol As DataColumn In dt.Columns
                    StData.Reader(0).Fields.Add(dCol.ColumnName)
                    grdData.ColumnModel.Columns.Add(New GroupingSummaryColumn With {.SummaryType = SummaryType.Sum, .DataIndex = dCol.ColumnName, .Header = dCol.ColumnName})
    
    
                Next
    
    
                StData.DataSource = dt
                StData.DataBind()
                grdData.Reconfigure()
            End If
        End Sub
    Is there any workaround for this issue or am I missing some property setting?

    Thanks
    Last edited by Daniil; Dec 03, 2012 at 11:29 AM. Reason: [CLOSED]
  2. #2
    Please wrap all code samples in [CODE] tags.

    Forum Guidelines For Posting New Topics
    More Information Required
  3. #3
    It's not Column's Header, the problem is on DataIndex

    DataIndex = dCol.ColumnName
    Header = dCol.ColumnName
    Last edited by RCN; Nov 27, 2012 at 12:39 PM.
  4. #4
    The Column's Header accepts special characters, as shown below:

    Click image for larger version. 

Name:	Example 014.png 
Views:	75 
Size:	42.1 KB 
ID:	5191
  5. #5
    So does that mean column dataIndex does not allow special characters? If not, is there a way out to assign that column header with special characters as DataIndex?

    Quote Originally Posted by RCN View Post
    It's not Column's Header, the problem is on DataIndex

    DataIndex = dCol.ColumnName
    Header = dCol.ColumnName
    Last edited by iansriley; Nov 27, 2012 at 3:09 PM.
  6. #6
    Last edited by RCN; Nov 27, 2012 at 6:19 PM.
  7. #7
    I would avoid special characters in DataIndex (i.e. in ModelField's Name).

Similar Threads

  1. [CLOSED] Special characters dosen't works in message box in IE8
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 03, 2012, 12:01 PM
  2. [CLOSED] ColumnName with Special Characters in GridPanel
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 07, 2012, 7:12 PM
  3. [CLOSED] Multi Level Grid -> Column Headers css style and alignment
    By bsnezw in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 16, 2011, 3:22 PM
  4. Replies: 0
    Last Post: Jun 11, 2010, 2:04 AM
  5. [CLOSED] Turkish special characters problem
    By tansu in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 26, 2009, 12:01 PM

Posting Permissions