Grid with special characters in ColumnName not showing data

6 posts, 0 answers
  1. Dennis
    Dennis avatar
    38 posts
    Member since:
    Aug 2010

    Posted 25 Apr 2011 Link to this post

    Hi,

    I have a GridView placed into which the Columns are being created based on the data supplied to the ItemsSource.
    I have used the Telerik solution to convert the DataTable that is fetched from the query and supplied it to the grid.
    The problem that I'm facing is that whenever the DataColumn contains an '&' placed anywherein the name, except for the end,
    the GridView does not display the data for that particular column. If I simply remove the '&' from the column name in the select query the data appears in the column.
    Somebody please provide a solution and an explanation as to why this is happening.

    Thanks In Advance.
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 26 Apr 2011 Link to this post

    Hi David,

    The "&" symbol is a special symbol and it cannot be used for column names. May I ask you to supply column names without this symbol. 



    Kind regards,
    Milan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Dennis
    Dennis avatar
    38 posts
    Member since:
    Aug 2010

    Posted 26 Apr 2011 Link to this post

    Hi Milan,

    I'm afraid that's not something I can control. The data used to generate the Grid is defined in one of my forms. I'm providing the user the ability to name the Columns. The user may supply any possible value that he wishes for the column name. It would really be great if you could provide me some solution to control this. '&' might be one of the many special characters that the grid may not support. I want to deal with all subsequent possible similar situations.

    Thanks In Advance.

  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 26 Apr 2011 Link to this post

    Hi,

     This is not related to RadGridView in any way. Our DataTable will create dynamic class with dynamic properties and you cannot have property name with such character. 

    Greetings,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Dennis
    Dennis avatar
    38 posts
    Member since:
    Aug 2010

    Posted 28 Apr 2011 Link to this post

    HI,

        From what has been stated, I feel that probably the Grid uses the DataSource with the current set of values to generate the dynamic class with thier properties. In that case, would it possible to have a code that sets the values of the gridcolumn headers after all the classes and their properties have been loaded. 

                I would like to have an example that takes the ItemsSource from the wcf service to load the grid and generate the grid, and also take the Grid header Names seperately and set the Header names after the classes and their properties have been loaded in order to avoid the special character problem for the identifiers.

    Thanks
  6. Senthil
    Senthil avatar
    4 posts
    Member since:
    Oct 2011

    Posted 17 Oct 2011 Link to this post

    I too have the same problem with databinding when the data source has Numbers or special characters on the column Name.
    Ex, ColumnName is working fine whereas 1ColumnName is not.
    Column Name with / is not working either.
    I'm trying to Autogenerate the columns and the columnNames are directly fetched from DB through datatable.

    Any help would be much appreciated.
Back to Top