Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I have a requirement like i have a gridivew in usercontrol, and this user control in placed in aspx page( say a.aspx), when i enter some data in a.aspx page that data must be displayed on gridview of usercontrol, i was sucessfull in calling the usercontrol method that fill the gridview, but data is not binding.

Eg Code

in aspx

usercontrol1.binddata( Data)

in usercontrol

binddata(dataset data)
{
Gridview1.datasource=data;
Gridview1.databind();

}
Posted
Comments
adriancs 17-Mar-14 22:35pm    
The code shown by you seems to be fine.
You have to provide more info.
syed shanu 18-Mar-14 1:07am    
Try with debug.Place th4 break point at usercontrol1.binddata( Data); and check you have records in Data and step by step chk for the result.

1 solution

bind the user control again when you insertdata in grid............
or refresh the page
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900