1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / NeedDataSource and User Control

NeedDataSource and User Control

2 posts, 0 answered
  1. Randy Bauer
    Randy Bauer avatar
    67 posts
    Registered:
    25 Sep 2009
    16 Dec 2009
    Link to this post
    Hello,

    I made my own user control and tables.  The controls use the radEditor and radGrid and display data from my tables.  I have this working outside of Sitefinity, and  I starting to research including these in my site.  Is it a good practice to call the NeedDataSource to read these tables or should I be using something else?

    Thanks,

    Randy
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Dec 2009
    Link to this post
    Hello Randy Bauer,

    Basically, you assign data source for your grid in the NeedDataSource handler. The handler is generally used in advanced data binding of RadGrid ASP.NET AJAX control. Also, it is essential that you should never call the Rebind() method in a NeedDataSource  event handler.You should never call DataBind() as well when using advanced data-binding through NeedDataSource.


    Regards,
    Ivan Dimitrov
    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.
2 posts, 0 answered