This is a migrated thread and some comments may be shown as answers.

Javascript exception after clicking filter button on column if the grid has an ID containing the word "Header"

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alain
Top achievements
Rank 1
Alain asked on 12 Jul 2012, 04:30 PM
ASP.NET AJAX: 2012.2.607.40
Visual Studio 2010 SP1
Browsers: Internet Explorer 8, Firefox 13, Opera 11

Hello,

If the ID of a RadGrid contains the word "Header", Javascript exeption raises on filter button of a column, the filter menu doesn't appear (see annexed image BugIDGrid_FilterJavascript.jpg), doesn't matter the DataSource of the RadGrid.

Below a list of IDs containing the word "Header" that give or not the mentionned javascript expection.
  • "Header_...": exception raised
  • "_Header_...": ok
  • "M_Header...": exception raised
  • "MHeader....": ok

Can Telerik and someone else confirm this problem?

Line raising the exception:

this._buildFilterMenuItemList(this._filterMenu,f._data.FilterListOptions,f._data.DataTypeName,f._data.CurrentFilterFunction,f);
The variable 'f' is null, because the following function, getColumnByUniqueName(), above the previous line returns null:
var f=a.getColumnByUniqueName(i);
The function getColumnByUniqueName() calls "this.get_columns()" of RadGrid that returns an empty list in this case even if columns are added declaratively in RadGrid.

One workaround, of course, is not to use the word "Header" for an ID of Telerik controls.

Best regards,
Alain

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 17 Jul 2012, 12:40 PM
Hi Alain,

Using just "Header" in the grid's ID should not cause any issues, however, if the ID happens to contain "_Header" in its definition unwanted results may occur as observed in your case. The reason is that we are using the string "_Header" in internal RadControls client-side code and we highly suggest to avoid assigning IDs containing "_Header", "_Footer","_GridHeader","_GridFooter", etc.

Please choose a different ID for your RadGrid declaration. Thank you for your understanding and sorry for any inconvenience caused.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Alain
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or