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

[Solved] NeedDataSource not firing

1 Answer 198 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MD
Top achievements
Rank 1
MD asked on 13 Nov 2009, 03:31 PM
I'm having a problem where the NeedDataSource event of the grid is not firing on initial load when I load and add a user control containing a grid in a Place Holder control.  I don't experience the same problem when loading and adding the user control in a RadPageView.  The user control loads and runs through the normal lifecycle, but the grid's NeedDataSource Event doesn't fire when adding it to a place holder.  The NeedDataSource method is wired to the grid's event and works as expected when the user control is added to other controls.  Any ideas on why it doesn't fire would be appreciated. 

UserControlwGrid userControlwGrid = (UserControlwGrid)LoadControl("UserControlwGrid.ascx"); 
userControlwGrid.ID = "userControlwGrid";
//Set additional Properties of User Control
 
placeholder.Controls.Add(userControlwGrid); 
 
 
UserControlwGrid userControlwGrid = (UserControlwGrid)LoadControl("UserControlwGrid.ascx"); 
userControlwGrid.ID = "userControlwGrid"
//Set additional Properties of User Control
 
RadPageView.Controls.Add(userControlwGrid); 

Never gets called
protected void radGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    radGrid.DataSource = GetMyDataSource(); 

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 16 Nov 2009, 05:41 PM
Hello MD,

I could not reproduce the problem you describe. Could you try reproducing the issue on the attached sample and get back with the result.

Thanks.

Sincerely yours,
Tsvetoslav
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.
Tags
Grid
Asked by
MD
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or