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

Filtering : invalid column name

4 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Evelyne Schreiner
Top achievements
Rank 1
Evelyne Schreiner asked on 07 Aug 2012, 01:48 PM
Using a radgrid with AllowFilteringByColumn="true" I get this error:
“Invalid Column Name …”.

The SQL request used for data binding is :
SELECT myName AS [Another name] FROM TEST

So, I think the problem is the alias, but I don’t know how to solve it.

Could anyone help me, please?

4 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 10 Aug 2012, 06:09 AM
Hi Evelyne,

There should be no problem with the aliases, just make sure that the alias does not contain spaces and that the alias is assigned to the DataField property of the column bound to this field.

Hope it helps.

Greetings,
Tsvetoslav
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.
0
Evelyne Schreiner
Top achievements
Rank 1
answered on 10 Aug 2012, 12:41 PM
Thank you Tsvetoslav.

Does that mean that I'm forced to set the columns of the grid ?

So far, I didn't do it and the number of columns (which change according to various conditions) is set through the select (Select column1, column2...).
0
Tsvetoslav
Telerik team
answered on 13 Aug 2012, 08:13 AM
Hi Evelylne,

No, you don't need that - could you paste your whole mark-up and code-behind using the CODE FORMATTER tool of the ticket editor.

All the best,
Tsvetoslav
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.
0
Evelyne Schreiner
Top achievements
Rank 1
answered on 15 Aug 2012, 06:44 AM
Thank you Tsvetoslav, I've finally found how to solve my problem.




Tags
Grid
Asked by
Evelyne Schreiner
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Evelyne Schreiner
Top achievements
Rank 1
Share this question
or