Jump to content
Xtreme .Net Talk

gvector1

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by gvector1

  1. How would I do that? I have tried it so far by creating a public method call Reload() in each form. In the main form I use foreach(Form f in MdiChildren) { f.Reload(); } but it will not work. Reload is only available from an instance of the specific class, not from the form class. Am I wrong???? That is just from my thinking, and my thinking is kind of whack some times.....lol. What would you suggest????? Thanks again, Kendal
  2. Use variable length parameters for a function. Ex: public void MethodName(params object[] list) {} Then you can check how many parameters were passed to the method. Kendal
  3. Take a look at this http://ourworld.compuserve.com/homepages/richard_grier/NETCommOCX.htm It might help Kendal
  4. Hello everyone, I need some help PLEASE! I have an application in which I am accessing a MySql Database. I query the database and store the results in a datatable. I then have to pull select information from the results datatable and add them to a different datatable. Everything works fine except for when I try to add the first line to the new DataTable. The very first Row I Add takes 6-7 seconds, after that it takes no time. I won't have that problem again until I restart the application. Following is a snippet of code where the problem occurs: dsDoctorList.Clear(); DataTable dtDocAppts = dsDoctorList.Tables["DoctorAppts"]; DataTable dtDocs = docSql.PullDocs(); //Load Doctor Number and Name foreach(DataRow dr in dtDocs.Rows) { DataRow myRow = dtDocAppts.NewRow(); myRow["doctor"] = dr["doctor"]; myRow["name"] = dr["name"]; //Right here is where it takes so long on the first add dtDocAppts.Rows.Add(myRow); } Does anyone have any suggestions as to what is causing this. Thanks, Kendal
  5. Hello everyone, I have created a MultiDocument application in C#. One that has one main form and a few child forms. What I am trying to do is that since these child forms access a database, I need to keep them updated. I already have the main parent form using a timer and polling the database for changes. When a change is detected I need to reload the forms. How can I reload a child form. Using the refresh method only redraws the form, I need to reload the form so that the method that updates the data on the form is executed. One of the problems is that the parent form does not create every one of it's child forms. A child form will also create a form with the parent set to it's parent. I hope I didn't lose you. Basically, the parent form does not instantiate every one of it's child forms. Ideally I would use a foreach(Form f in this.MdiChildren) to cycle through each form and execute a reload method. Each forms load method will reload the data, but I don't know how to trigger an event in a foreach loop. Any and all suggestions are greatly appreciated. Anyone have any suggestions on how to accomplish this?????? Thanks, Kendal
×
×
  • Create New...