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

The RadListView control does not have an item placeholder specified.

1 Answer 478 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Pierre
Top achievements
Rank 2
Iron
Iron
Pierre asked on 10 Nov 2009, 09:01 PM
HI, I got this error when I try to disply a image in the listview:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: The RadListView control does not have an item placeholder specified.

here the listviews
                                <telerik:RadListView runat="server" ID="RadLVPhotos" Enabled="false" 
                                    AllowPaging="true" PageSize="10" DataKeyNames="Id" OverrideDataSourceControlSorting="true" 
                                     OnNeedDataSource="RadLVPhotos_NeedDataSource" ItemPlaceholderID="ProductsHolder">  
                                    <EmptyDataTemplate> 
                                        <legend>Photos</legend>Aucune photo...  
                                    </EmptyDataTemplate> 
                                    <ItemTemplate> 
                                        <fieldset style="float: left; margin: 5px 5px 5px 5px; padding: 2px 2px 2px 2px;  
                                            background: #eeeeee" class="myClass" onmouseover="containerMouseover(this)" onmouseout="containerMouseout(this)">  
                                            <telerik:RadBinaryImage Style="cursor: pointer;" runat="server" ID="RadBinaryImage1" 
                                                DataValue='<%#Eval("Fichier.Content") %>' Height='60' Width="60" 
                                                ResizeMode="Fit" /> 
                                            <br /> 
                                        </fieldset> 
                                    </ItemTemplate> 
                                </telerik:RadListView> 

here the databinding:
    Protected Sub RadLVPhotos_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.RadListViewNeedDataSourceEventArgs)  
        Dim radLVPhotos As RadListView = DirectCast(source, RadListView)  
 
        If radLVPhotos.Enabled = True Then 
            Dim scope As IObjectScope = ScopeFactory.GetPerRequestScope(HttpContext.Current)  
            Dim nID As Int32 = Convert.ToInt32(hfID.Value)  
 
            radLVPhotos.DataSource = From ProdFich In scope.Extent(Of ProduitsFichier)() Select ProdFich Where ProdFich.ProdID = nID And ProdFich.EstImage = True 
        End If 
    End Sub 

any suggestion?
Thanks

1 Answer, 1 is accepted

Sort by
0
Pierre
Top achievements
Rank 2
Iron
Iron
answered on 10 Nov 2009, 09:20 PM
Sorry is my fault! I forgot the section: <LayoutTemplate> 
Tags
ListView
Asked by
Pierre
Top achievements
Rank 2
Iron
Iron
Answers by
Pierre
Top achievements
Rank 2
Iron
Iron
Share this question
or