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

Telerik.Web.UI.GridGroupByException

5 Answers 156 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
vinit
Top achievements
Rank 1
vinit asked on 03 Jul 2008, 04:52 AM
Hello

I got the Telerik.Web.UI.GridGroupByException error after I tried to drag and drop the column in the group by section of the RadGrid. The error was occured due to the space in the column name.

I want to catch this error and want to display the message to the user regarding the space in the column name.

So in which event I catch this error ?

Can any one help me regarding the same.

Thanks in advance.

Vinit

5 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Jul 2008, 08:20 AM
Hi vinit,

You can use square brackets "[" "]" for such field names. You can check this example:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GroupBy/Expressions/DefaultCS.aspx

Greetings,
Vlad
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
vinit
Top achievements
Rank 1
answered on 03 Jul 2008, 08:42 AM

Hello

Thanks for your reply.

I am getting the following error.

Field d not found in the source table. Please check the expression syntax.

Exception Details: Telerik.Web.UI.GridGroupByException: Field d not found in the source table. Please check the expression syntax.

My field name is 'd c', and after the drag the column it is only considered the 'd' and 'd' field not found.

And I want to catch that error in the RadGrid events.

The error was occured after the user drag and drop the column in the group section. It works fine for the without space column i.e. single word column.

Vinit

0
Daniel
Telerik team
answered on 07 Jul 2008, 01:17 PM
Hi vinit,

You probably mean DataField and not UniqueName of the column because it is not expected behavior to experience issues while using spaces in column name.

Unfortunately RadGrid does not support empty spaces, although the DB is able to store these values when wrapped in square brackets. The workaround shall be to use an underscore '_' character instead of empty space.

Regarding the second question - you can catch this exception -> Telerik.Web.UI.GridGroupByException.

Sincerely yours,
Daniel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
vinit
Top achievements
Rank 1
answered on 09 Jul 2008, 07:34 AM
Hello Daniel

Thanks for your reply.

In which event do I need to catch this exception ?
Telerik.Web.UI.GridGroupByException.

Regards

Vinit
0
Daniel
Telerik team
answered on 09 Jul 2008, 02:48 PM
Hello Vinit,

Please try this code snippet:
protected void Page_Error(object sender, EventArgs e) 
{  
    Exception currentException = Server.GetLastError(); 
 
    if(currentException is GridGroupByException) 
    { 
        Server.ClearError(); 
    } 

Greetings,
Daniel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
vinit
Top achievements
Rank 1
Answers by
Vlad
Telerik team
vinit
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or