Have to click twice on edit / update / cancel

2 posts, 0 answers
  1. ColinBowern
    ColinBowern avatar
    51 posts
    Member since:
    Aug 2012

    Posted 19 Nov 2009 Link to this post

    In a very basic sample I have a RadListView nested inside a FormView.  Data binding occurs at the FormView level which the ListView picks up through the DataSource property.  The problem I have is that a user needs to click twice on any of the command links twice to get them to work.  Not sure what is happening, but I suspect it has to do with the data binding model.  I am researching and thought I would post here in case someone is aware of something while I dig further into the issue:

    <telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
    <telerik:RadAjaxManager ID="AjaxManager" runat="server" /> 
    <asp:FormView ID="Inspection" runat="server" DataSourceID="InspectionDataSource" 
        DefaultMode="Edit"
        <EditItemTemplate> 
            <%# Eval("Name") %> 
            <telerik:RadListView ID="Items" runat="server" DataSource='<%# Bind("Items") %>'
                <LayoutTemplate> 
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server" /> 
                </LayoutTemplate> 
                <EditItemTemplate> 
                    Edit mode 
                    <asp:LinkButton ID="Update" runat="server" CommandName="Update" Text="Update" ValidationGroup="Item" /> 
                    <asp:LinkButton ID="Cancel" runat="server" CausesValidation="false" CommandName="Cancel" 
                        Text="Cancel" /> 
                </EditItemTemplate> 
                <ItemTemplate> 
                    Read mode 
                    <asp:LinkButton ID="Edit" runat="server" CausesValidation="false" CommandName="Edit" 
                        Text="Edit" /> 
                </ItemTemplate> 
            </telerik:RadListView> 
        </EditItemTemplate> 
    </asp:FormView> 
     
    <asp:ObjectDataSource ID="InspectionDataSource" runat="server" DataObjectTypeName="Foo.Inspection" 
    TypeName="Foo.DataSource" SelectMethod="RetrieveInspection" /> 

  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 20 Nov 2009 Link to this post

    Hi Colin,

    I suspect that the cause for the behavior is incorrect databinding. Using the approach shown in the sample will tie the datasource of the RadListView control to the FormView's one. Therefore the ListView will not be able to be explicitly databound  without an rebind of  the FormView as this is where the datasource is coming from. In order to correct this you should consider providing a separate datasource for the RadListView control instead.

    Greetings,
    Rosen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top