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

doesn't work ???

1 Answer 62 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Ch Perez
Top achievements
Rank 1
Ch Perez asked on 09 Feb 2011, 11:46 PM

hi,

i have this in the <ItemTemplate>
...
<asp:LinkButton ID="DelCom" runat="server" Visible="true" CommandName="TOTO"></asp:LinkButton>
...

in the itemdatabound i have this 
...
    Dim DD As String = Session("CLE_REF_LANGUAGE")
            Dim cle_lien_com As String = CType(DataBinder.Eval(CType(e.Item, RadListViewDataItem).DataItem, "CLE_LIEN_COMMENTAIRE"), String)

            Dim LnkDelCom As LinkButton = CType(e.Item.FindControl("DelCom"), LinkButton)
            LnkDelCom.Text = TClass.TRAD_OBJ("TXT_SUPPRIMER", DD)
            LnkDelCom.CssClass = "Del_LnkCom"
            LnkDelCom.Visible = True
            LnkDelCom.CommandArgument = cle_lien_com
            LnkDelCom.CommandName = "DelCom"
            AddHandler LnkDelCom.Command, AddressOf LnkDelCom_Click
...

the linkbutton appear ok !
but when i click on the link in IE, i have no event...

normaly listview start this event ???

Private Sub RAD_LV_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadListViewCommandEventArgs) Handles RAD_LV.ItemCommand

        Dim z As String = e.CommandName
        Dim v As String = e.CommandArgument

    End Sub

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 15 Feb 2011, 10:22 AM
Hello Ch Perez,

Do you mean the RadListView.ItemCommand event is not fired, or you do not get the LnkDelCom_Click method called? Note that RadListView's ItemDataBound event is not fired on every postback. It fires only when RadListView databinds. This is why it is not a good candidate for attaching event handlers in, as event handlers need to be re-attached on every postback.

Do you get this problem in IE only, or in other browsers too?

Veli
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
ListView
Asked by
Ch Perez
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or