At first i fill of my Main_GUI-Class a DataTable in my "Controler"-Class.
Methode of "Controller"-Class returns DataTable to the GUI-Class:
A Problem is, when i update my DataTable in my "Controler"-Class of some other GUI-Class, my Main_GUI-Class does not show me new Data on the Grid.
That is my Code:
public class Controller{
DataTable globalDataTable
public DataTable updateData(string param){
globalDataTable = sqlClass.getSQLData();
}
}
public partial class mainGUI: Form
{
Controller myController;
private void mainGUI_Load(object sender, EventArgs e) {
myController = new Controller();
myGrid.DataSource = myController.updateData("111"); //now Grid shows me Data from DataBase.
}
}
public partial class subGUI: Form
{
Controller control;
public void initilize(Controller cr){
this.control = cr;
}
private void sub_Load(object sender, EventArgs e) {
//...
}
private void someMethode(){
control.updateData("222"); //now i change my DataTable on "Controller"-Class
//but the mainGUI does not recognize new Data and does not show these on Main-gui
}
}
How can i solve this problem???
Thanks
Sumit Kesarwani
28-Jul-2014kap roma
28-Jul-2014Sumit Kesarwani
27-Jul-2014