Do I need to call DataBind() w/ NeedDataSource

5 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Jan 2011

    Posted 20 Jan 2011 Link to this post

    Not sure if I need to call DataBind() when using NeedData Source:

    protected void radGridRate_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
            {
                System.Diagnostics.Debug.WriteLine("radGridRate_NeedDataSource");

                if (!e.IsFromDetailTable)
                {
                    radGridRate.MasterTableView.DataSource = (DataTable)Session["dtServicesTopLevel"];
                }

            }

     
    Thanks!
    Dave Gilden MCSD / Ft. Worth

  2. Sypher
    Sypher avatar
    79 posts
    Member since:
    Aug 2006

    Posted 20 Jan 2011 Link to this post

    No, no call to DataBind is needed from NeedDataSource. :-)
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 21 Jan 2011 Link to this post

    Hi David,

    You should never call DataBind() method when using advanced data-binding through NeedDataSource. Please refer to the links below for more information:
    http://www.telerik.com/help/aspnet-ajax/grdadvanceddatabinding.html
    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/needdatasource/defaultcs.aspx

    Best wishes,
    Pavlina
    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.
  5. David
    David avatar
    3 posts
    Member since:
    Jan 2011

    Posted 21 Jan 2011 Link to this post

    What would cause the NeedDataSource not to fire -- this is what is currently happening I haved removed the DataBind() call
    and where would you call ReBind()?

    Thanks!

    DaveG
  6. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 24 Jan 2011 Link to this post

    Hello David,

    Please examine the attached project which is working as expected and let me know if it is useful for you or you need further assistance.

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