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

Unable to filter using GridTemplateColumn with DataField present

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sriram
Top achievements
Rank 1
Sriram asked on 07 Aug 2014, 05:21 PM
Hi,

I am unable to do filtering on the GridTemplateColumn. 

<telerik:GridTemplateColumn HeaderText="<%$ Resources:UI, EmployeeNotesTab_HeaderText_coContact_Contact %>" UniqueName="Contact" DataField="coContact.ExtFormattedFullName">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<ItemTemplate>
<asp:Literal ID="lblContact" runat="server" Text='<%# Eval("coContact.ExtFormattedFullName") %>' />
<div>
<small><asp:Label ID="lblFormattedPhone" runat="server" CssClass="darkBlueFont" Text='<%# GetFormattedPhone(Eval("coContact")) %>' /></small></div>
<div><small><asp:Label ID="lblContactType" runat="server" CssClass="darkBlueFont" Text='<%# Eval("coContact.coContactType.typeName") %>' /></small></div>
</ItemTemplate>
</telerik:GridTemplateColumn>

coContact.ExtFormattedFullName is throwing "Object reference not set to an instance of an object" NullReferenceException. 

The <asp:Literal> is displaying the data properly in the column. (Attached is the screenshot).

Please share your thoughts as to how this can be fixed.

Regards,
Sriram

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 12 Aug 2014, 10:38 AM
Hi Sriram,

Based on the provided information it is hard to say what is causing the demonstrated issue. Could you please post your aspx page markup of the grid with the related code behind file? Also could you please disable the ajax (RadAjaxManager or RadAjaxPanel) and let me know what is the exception which is thrown and what is its message. The other option is to start application in debug mode and to see which line of server side code throws the error.

Looking forward for your reply.

Regards,
Radoslav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Sriram
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or