Why Itemdatabound firing twice in radgrid using vb.net

3 posts, 0 answers
  1. Loki
    Loki avatar
    4 posts
    Member since:
    May 2015

    Posted 18 Mar Link to this post

    Hi telerik,

    Strucked in getting resoluation, itemdatabound in radgrid firing twice in vb.net.

    Thanks,

    Lokesh

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 22 Mar Link to this post

    Hello Lokesh,

    Note that the ItemDataBound is fired for every item in RadGrid. This means that the event is raised for every DataItem and also for the corresponding EditFormItem. If you would like to implement code that will be executed only for the DataItems in the grid you can use the following approach:


    Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs)
        If TypeOf e.Item Is GridDataItem Then
            ' add custom logic here
        End If
    End Sub


    Check out the following article that elaborates on the matter in more detail:



    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Loki
    Loki avatar
    4 posts
    Member since:
    May 2015

    Posted 22 Mar Link to this post

    Hi Viktor Tachev,

    it worked for me. Thank you so much.

     

    Thanks,

    Lokesh

Back to Top