How to access a datagrid from a web page in a ...
-
i have a datagrid and a usercontrol in a webpage. i pass the datagrid to the usercontrol and i modify the datasource in usercontrol . but the datasource in the webpage is not modified from the usercontrol. is this possible ? Help me Shankar C
-
i have a datagrid and a usercontrol in a webpage. i pass the datagrid to the usercontrol and i modify the datasource in usercontrol . but the datasource in the webpage is not modified from the usercontrol. is this possible ? Help me Shankar C
Hi there, If you want to modify the datasource in the user control and also want the datagrid to reflect the changes, then you can pass the datasource object instead of the grid to the user control and rebind the updated datasource to the grid. However, IMO you'd better move the code to update the datasource of the datagrid from the user control to the web page.