how to reload database?
-
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa
-
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa
-
You can add a "Reload" button or menu option and then write the code to query the database and reload your datagrid.
-
is the reload button has to be in the same form as the datagrid? can I ask the other form when the Add buton click, then to reload main form's datagrid? what's the code for the datagrid reload? is it datagril.reload()? Lisa
Sorry, I don't know that much about datagrids but I assume that when the datagrid first appears it is populated with the info from database as it is at that moment. You didn't say whether you are using VB or VB.NET. For VB.NET if you want the updated information, you have to clear and fill the dataSet again in order for the new information to show up in the datagrid. Whether it would work from another form, you'll have to try it and see. For VB I assume you would do whatever you did to populate the datagrid originally.
-
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks!
-
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks!
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Mohammed Amer
-
I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Mohammed Amer