Automatic Column UniqueName rename

5 posts, 0 answers
  1. Franz
    Franz avatar
    7 posts
    Member since:
    Oct 2013

    Posted 13 May 2015 Link to this post

    Hi,

    Recently I upgraded to Version 2015.1.401.45.  After this upgrade, a column with name 'IsNew'  that should be hidden. was displayed, although in the version before it is not displayed.

    When debugging, I found out, that this column is renamed automatically to IsNew1. There is no other column with the same name in my datasource.

    So I suppose, that with the new version IsNew is recognized to be a keyword??

     This is the method for hiding columns:

    private void HideColumns()
            {
     
                //set the visibility of columns defined in HiddenColumns to false
                if (CGGrid.MasterTableView.Items.Count >= 0)
                {
     
                    foreach (var item in HiddenColumns.Where(item => !String.IsNullOrEmpty(item)))
                    {
                        try
                        {
                            var column = CGGrid.MasterTableView.GetColumn(item);
                            if (column != null) column.Visible = false;

                        }
                        catch (Exception e)
                        {
                            LOGGER.Error(e);
                        }
                    }
                }
            }

  2. Kostadin
    Admin
    Kostadin avatar
    1733 posts

    Posted 18 May 2015 Link to this post

    Hello Franz,

    I used the provided code and I prepared a small runnable sample based on it. Nevertheless on my side the column is hiding properly and the UniqueName remains unchanged. Could you please check out the attached sample and let me now how it differs from your real setup?

    Regards,
    Kostadin
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. Jason M
    Jason M avatar
    2 posts
    Member since:
    Mar 2010

    Posted 16 Jul 2015 in reply to Franz Link to this post

    Hello Franz,

    I am running into an issue where one of my auto-generated column's UniqueName is getting a 1 appended onto it, the column is not hidden. Did you find a solution to this issue?

    Thank You,

    Jason

  4. Kostadin
    Admin
    Kostadin avatar
    1733 posts

    Posted 21 Jul 2015 Link to this post

    Hello Jason,

    Could you please send your code declaration and the related code behind in order to investigate the cause for this issue further. Generally when using auto-generated columns the UniqueNames will be the same as the names of you database fields.

    Regards,
    Kostadin
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  5. Jason M
    Jason M avatar
    2 posts
    Member since:
    Mar 2010

    Posted 31 Aug 2015 in reply to Kostadin Link to this post

    Hello Kostadin,

    Thank you for your response. I did not see the email notifying me of it, so I apologize for the delay. I resolved the issue by defining the data structure of my grid columns in the Page_Init instead of the Page_Load. I found this in ​another of the telerik forum threads. 

     Thank You,

    Jason M

Back to Top