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

[Solved] Dynamically created RadGrid, GridTemplateColumn using an ITemplate, and grouping

3 Answers 241 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason Denney
Top achievements
Rank 1
Jason Denney asked on 06 Nov 2009, 11:54 PM
During OnInit of my page I programmatically create a RadGrid and create the columns to be added to the grid.  Some of the columns being created are GridTemplateColumn's in which I have created my own ITemplate.  The column show up fine and all the GridBonudColumns appear to be sorting, grouping, and filtering fine, however my ITemplate column results in a javascript error: Sys.WebForms.PageRequestManagerServerErrorException; Expression cannot be null or empty.  I'm not sure what I need to do in order for this to work on my Template column.  I looked over the programmatic creation example in the help document but I didn't see anything that I am not doing already.

Right now I am evaluating the trial download and looking to purchase the asp.net controls however the sorting and grouping of template columns needs to be supported so any help would be appreciated.

Thanks,
Jason

3 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 11 Nov 2009, 02:01 PM
Hi Jason,

This actually is a server side exception - can you verify using the debugger the stack trace and post it?

Regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jason Denney
Top achievements
Rank 1
answered on 16 Nov 2009, 05:49 PM
After the response about it being server side error I realized that the RadAjaxPanel was causing the real error to not be known right away.  After getting the error message I was creating an img tag within my template and assigning the id therefore it was creating the same id for 6 columns in the grid.  After removing the set for the id it started behaving as intended.

I now have 2 more question but I haven't spent anytime looking to see if it is documented yet but here they are anyways.

1) can the RadAjaxPanel be configured to display the server side errors?
2) can an ITemplate also support the INamingContainer so that the ID's would be generated with unique names?

If it would be best to repost these questions than I can do so after I also have the time to do some research on this as well.

Thanks,
Jason
0
Mira
Telerik team
answered on 19 Nov 2009, 01:45 PM
Hello Jason,

Straight to your questions:
1) Please take a look at the Error Handling For Ajax Requests help topic showing how you can handle errors with ajax.
2) Please sent us your ITemplate class and the definition of the RadGrid so that we can investigate it further and provide the best solution for your case.

Greetings,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Jason Denney
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jason Denney
Top achievements
Rank 1
Mira
Telerik team
Share this question
or