Hi, I make a MyODBC (MySQL) to write down table to grid with this code:
NumRows = SQLEXEC(myConnection, "select Mailbox from coba", 'MyCursor')
ThisForm.Grid1.RecordSource= "mycursor"
But If I modified that table value (delete or Add record), I have to refresh the grid value. To refresh the value I can not use thisform.grid1.refresh, because it have to read from MySQL server to get newest data. Well, so I have to recall the code above again to show at the same Grid.
The problem is, when I use above code for show grid for the second time, the grid event will be reset so the format for column width, header text, etc. Also the event at clik procedure or dblclick procedure will be gone.
What should I do to solve this problem?
Thank you in advance.
NumRows = SQLEXEC(myConnection, "select Mailbox from coba", 'MyCursor')
ThisForm.Grid1.RecordSource= "mycursor"
But If I modified that table value (delete or Add record), I have to refresh the grid value. To refresh the value I can not use thisform.grid1.refresh, because it have to read from MySQL server to get newest data. Well, so I have to recall the code above again to show at the same Grid.
The problem is, when I use above code for show grid for the second time, the grid event will be reset so the format for column width, header text, etc. Also the event at clik procedure or dblclick procedure will be gone.
What should I do to solve this problem?
Thank you in advance.