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

Do I need to call DataBind() w/ NeedDataSource

4 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 21 Jan 2011, 12:54 AM
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

4 Answers, 1 is accepted

Sort by
0
Sypher
Top achievements
Rank 1
answered on 21 Jan 2011, 02:08 AM
No, no call to DataBind is needed from NeedDataSource. :-)
0
Pavlina
Telerik team
answered on 21 Jan 2011, 03:35 PM
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.
0
David
Top achievements
Rank 1
answered on 21 Jan 2011, 05:32 PM
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
0
Pavlina
Telerik team
answered on 24 Jan 2011, 12:14 PM
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.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Sypher
Top achievements
Rank 1
Pavlina
Telerik team
David
Top achievements
Rank 1
Share this question
or