Click here to Skip to main content
15,902,299 members
Home / Discussions / C#
   

C#

 
Generalquery dataset Pin
xrado22-Jun-05 1:38
xrado22-Jun-05 1:38 
GeneralRe: query dataset Pin
Marc Clifton22-Jun-05 1:50
mvaMarc Clifton22-Jun-05 1:50 
GeneralRe: query dataset Pin
Paul Brower22-Jun-05 3:02
Paul Brower22-Jun-05 3:02 
GeneralRe: query dataset Pin
xrado22-Jun-05 3:17
xrado22-Jun-05 3:17 
GeneralRe: query dataset Pin
Paul Brower22-Jun-05 3:46
Paul Brower22-Jun-05 3:46 
GeneralRe: query dataset Pin
david cohoon22-Jun-05 7:55
david cohoon22-Jun-05 7:55 
GeneralRe: query dataset Pin
Anonymous22-Jun-05 8:08
Anonymous22-Jun-05 8:08 
GeneralC# MDI parent form & mdi form childs questions...urgent help please! Pin
GianlucaSeno22-Jun-05 0:49
GianlucaSeno22-Jun-05 0:49 
I've written a C# winform app and I'm new on C#...but I've some experience in programming...
I've some problems that I can't found anywhere a resolution...
My program is designed to have a main MDI form and a lot of MDI childs...so my questions are:

1)I create dinamically menu on MDI form and I've assigned to each of the a shortcut...but for the first element (i.e. "&File" menu than I've assigned Shortcut.CTRLF) it doesn't work...why?!?
the code is this:

void menuBuilder(object sender, System.EventArgs e)
{
MainMenu mainMenu = new MainMenu();

MenuItem file = new MenuItem();
file.MergeOrder=0;
file.MergeType=MenuMerge.MergeItems;
file.Text="&File";
file.Index=0;
file.Shortcut=Shortcut.CtrlF;
mainMenu.MenuItems.Add(file);

this.Menu=mainMenu;
}

2)I have a MDI child open correctly in my app from MDI menu (that I'll call FORM1) and I want that from FORM1, when it's loaded, to open another MDI child (FORM2) with a datagrid inside it.To do this I do this...

FORM2 newMDIChild = new FORM2();
newMDIChild.MdiParent = this.MdiParent;
newMDIChild.Show();

I suppose that in this manner I can load FORM 2 as a MDI child but it not seems to work, becouse if I tested if the window is open it doesnt works...and open another window!

2a)I try to close FORM2 when I close FORM1 but I can never do it...how can I do?!?I try everything but never works...

2b)When I do some works on FORM1, I write something on an ACCESS DB and then I'd like FORM 2(that is active too) update datagrid inside it...but I try everything but nothing work!!!I try to call a method on FORM2 from FORM1 becouse I suppose that it updates my datagrid...
The code is:

public void ReadResults()
{
OleDbDataAdapter da = new OleDbDataAdapter();
OleDbConnection con =new OleDbConnection();
OleDbCommand cmd = new OleDbCommand();
DataTable dt =new DataTable();
dt.Clear();
con.ConnectionString=<connstr>;
con.Open();

cmd.Connection = con;
cmd.CommandText = "SELECT * FROM TBL";

da.SelectCommand = cmd;
da.Fill(dt);

dataPreResult.SetDataBinding(dt,"");

cmd.Cancel();
con.Close();
}
I call this method on FORM2_Load and work fine...but if I want to reload datagrid when the FORM2 is displayed...what I've to do?!?

Help me please...I know that this are very stupid questions...but I didnt find anything everywhere that can help me...


GeneralRe: C# MDI parent form &amp; mdi form childs questions...urgent help please! Pin
sreejith ss nair22-Jun-05 2:57
sreejith ss nair22-Jun-05 2:57 
GeneralRe: C# MDI parent form &amp; mdi form childs questions...urgent help please! Pin
GianlucaSeno22-Jun-05 3:42
GianlucaSeno22-Jun-05 3:42 
GeneralRe: C# MDI parent form &amp; mdi form childs questions...urgent help please! Pin
david cohoon22-Jun-05 7:19
david cohoon22-Jun-05 7:19 
GeneralRe: C# MDI parent form &amp; mdi form childs questions...urgent help please! Pin
GianlucaSeno22-Jun-05 7:42
GianlucaSeno22-Jun-05 7:42 
GeneralRe: C# MDI parent form &amp; mdi form childs questions...urgent help please! Pin
Anonymous22-Jun-05 11:18
Anonymous22-Jun-05 11:18 
GeneralPOS system Pin
Carl-Johan Larsson21-Jun-05 23:19
Carl-Johan Larsson21-Jun-05 23:19 
Generalcustom treeview structure Pin
deep721-Jun-05 23:16
deep721-Jun-05 23:16 
GeneralRe: custom treeview structure Pin
Dave Kreskowiak22-Jun-05 5:46
mveDave Kreskowiak22-Jun-05 5:46 
GeneralManipulate Windows Explorer folder properties dialog Pin
Ligblou21-Jun-05 23:03
Ligblou21-Jun-05 23:03 
GeneralRe: Manipulate Windows Explorer folder properties dialog Pin
Ligblou22-Jun-05 3:42
Ligblou22-Jun-05 3:42 
GeneralRe: Manipulate Windows Explorer folder properties dialog Pin
Dave Kreskowiak22-Jun-05 5:33
mveDave Kreskowiak22-Jun-05 5:33 
GeneralRe: Manipulate Windows Explorer folder properties dialog Pin
Ligblou22-Jun-05 22:11
Ligblou22-Jun-05 22:11 
GeneralRe: Manipulate Windows Explorer folder properties dialog Pin
Dave Kreskowiak22-Jun-05 5:28
mveDave Kreskowiak22-Jun-05 5:28 
GeneralRe: Manipulate Windows Explorer folder properties dialog Pin
Ligblou22-Jun-05 22:14
Ligblou22-Jun-05 22:14 
GeneralRichTextbox Problem Pin
heavenamour21-Jun-05 22:35
heavenamour21-Jun-05 22:35 
Generalsimple question or not Pin
raf9521-Jun-05 22:29
raf9521-Jun-05 22:29 
GeneralRe: simple question or not Pin
Sebastian Schneider21-Jun-05 23:21
Sebastian Schneider21-Jun-05 23:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.