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

DataItem in Telerik.Web.UI not available

1 Answer 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew Hardesty
Top achievements
Rank 1
Matthew Hardesty asked on 23 Mar 2010, 06:31 PM


I am following the example posted here
Demo

specifically the custom user control containing the following Code :

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<ul class="productDetails">
    <li <%=(DataItem is Telerik.Web.UI.GridInsertionObject) ? "style='display:none;'": ""%>>
        <label>
            Product ID:</label>
        <%# DataBinder.Eval(DataItem,"ProductID") %>
    </li>

...

my problem is that the DataItem is not recognized in the namespace: 

Message: Sys.WebForms.PageRequestManagerServerErrorException: c:\SSW\Controls\Edit\AgencyDivisionDetail.ascx(11): error CS0103: The name 'DataItem' does not exist in the current context

 I am using the single Telerik.Web.UI dll for AJAX only so far in my application (Version 2009.3.1314.35), and cannot find DataItem.   Do I need something else to use DataItem?  is this a namespace issue?   Thanks!

1 Answer, 1 is accepted

Sort by
0
Matthew Hardesty
Top achievements
Rank 1
answered on 23 Mar 2010, 11:51 PM
I found my own error.  The User Control did not extend System.Web.UI.UserControl and IBindableControl.
Tags
Grid
Asked by
Matthew Hardesty
Top achievements
Rank 1
Answers by
Matthew Hardesty
Top achievements
Rank 1
Share this question
or