Multiple controls with the same ID 'FilterTextBox_?? when using UniqueName

2 posts, 0 answers
  1. Bob
    Bob avatar
    40 posts
    Member since:
    Jul 2017

    Posted 08 Aug 2017 Link to this post

    I have created a Grid ServerSide.  The first time the grid loads it is fine, but any time a subsequent load happens I get the above error for any column where I am trying to set a UniqueName.  I am clearing out all columns before new ones are created so I don't see why I am getting this.  Here is a snippit of my code:

    // Clear all Grid Columns to start from scratch
    foreach (string column in columns)
        if (column.ToLower() == "recordid")
            RadGrid.MasterTableView.ClientDataKeyNames = new string[] { column };
            RadClientDataSource1.Schema.Model.ID = column;
        GridBoundColumn col = new GridBoundColumn()
            DataField = column,
            UniqueName = column,
            HeaderText = column.Replace("_", " "),
            FilterDelay = 300
  2. Eyup
    Eyup avatar
    4079 posts

    Posted 11 Aug 2017 Link to this post

    Hi Bob,

    There is no need to clear the columns so please remove this line. Also, make sure that you are creating the grid entirely on code-behind during the Page_Init event handler as demonstrated in the following section:

    If you want to change the columns dynamically, please follow the steps explained in this article:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top