Click here to Skip to main content
15,920,632 members
Home / Discussions / C#
   

C#

 
GeneralRe: incrmenting by 01 instead of 1 Pin
eyeseetee10-Dec-07 3:27
eyeseetee10-Dec-07 3:27 
GeneralRe: incrmenting by 01 instead of 1 Pin
J4amieC10-Dec-07 5:07
J4amieC10-Dec-07 5:07 
GeneralProblem with datatable Pin
Shaahinm10-Dec-07 1:04
Shaahinm10-Dec-07 1:04 
GeneralRe: Problem with datatable Pin
CKnig10-Dec-07 1:17
CKnig10-Dec-07 1:17 
Generalwebbrowser progressbar control Pin
Hari Om Prakash Sharma10-Dec-07 0:58
Hari Om Prakash Sharma10-Dec-07 0:58 
GeneralRe: webbrowser progressbar control Pin
CKnig10-Dec-07 1:01
CKnig10-Dec-07 1:01 
GeneralRe: webbrowser progressbar control Pin
Hari Om Prakash Sharma10-Dec-07 1:16
Hari Om Prakash Sharma10-Dec-07 1:16 
GeneralRe: webbrowser progressbar control Pin
Luc Pattyn10-Dec-07 2:04
sitebuilderLuc Pattyn10-Dec-07 2:04 
GeneralThank u so much! Pin
Hari Om Prakash Sharma10-Dec-07 17:50
Hari Om Prakash Sharma10-Dec-07 17:50 
Generalproblem with if statement Pin
eyeseetee10-Dec-07 0:27
eyeseetee10-Dec-07 0:27 
GeneralRe: problem with if statement Pin
CKnig10-Dec-07 0:38
CKnig10-Dec-07 0:38 
GeneralRe: problem with if statement Pin
eyeseetee10-Dec-07 1:39
eyeseetee10-Dec-07 1:39 
Questionhow to get present item from generic list using c# Pin
ramyanaidu9-Dec-07 23:59
ramyanaidu9-Dec-07 23:59 
AnswerRe: how to get present item from generic list using c# Pin
Anthony Mushrow10-Dec-07 0:09
professionalAnthony Mushrow10-Dec-07 0:09 
AnswerRe: how to get present item from generic list using c# Pin
CKnig10-Dec-07 0:58
CKnig10-Dec-07 0:58 
Generalupdates on stored procedure does not appear on dataset Pin
subai9-Dec-07 23:48
subai9-Dec-07 23:48 
GeneralSwitching Internet connections Pin
new2pgrmg9-Dec-07 23:47
new2pgrmg9-Dec-07 23:47 
Generalproblem with propertygrid Pin
Deglimmer9-Dec-07 23:43
Deglimmer9-Dec-07 23:43 
GeneralRe: problem with propertygrid Pin
visualhint13-Dec-07 11:36
visualhint13-Dec-07 11:36 
Generalproblem to load Data from form2 to form1.gridView Pin
hdv2129-Dec-07 23:32
hdv2129-Dec-07 23:32 
hi in my app, i have two forms, in form1, i have a button and gridview and a public method as 'LoadData' as follow :
public void LoadData()<br />
        {<br />
            using (SqlConnection con = new SqlConnection("Data Source=server;Initial Catalog=northwind;User Id=sa;Password=1;"))<br />
            {<br />
                SqlCommand cmd = new SqlCommand("select * from customers", con);<br />
                SqlDataReader dr;<br />
                DataTable dt = new DataTable();<br />
                con.Open();<br />
                dr = cmd.ExecuteReader();<br />
                dt.Load(dr);<br />
                con.Close();<br />
                this.gridControl1.DataSource = dt.DefaultView;<br />
            }<br />
        }


in button_click event, i show form2 as follow :
private void simpleButton1_Click(object sender, EventArgs e)<br />
        {   <br />
            Form2 frm = new Form2();<br />
            frm.Show();<br />
        }

in form2, i have only one button, i want when i click this button, create object from form1 and calling LoadData() method to fill gridView as follow :
private void simpleButton1_Click(object sender, EventArgs e)<br />
        {<br />
            Form1 frm = new Form1();<br />
            frm.LoadData();<br />
        }

but in runTime, when i click button in form2, gridView does not fill, i trace my app and i saw frm.LoadData() was correctly work but gridView does not fill, where does my problem and how to solve it ?
thanks
GeneralRe: problem to load Data from form2 to form1.gridView Pin
CKnig10-Dec-07 1:10
CKnig10-Dec-07 1:10 
GeneralRe: problem to load Data from form2 to form1.gridView Pin
hdv21210-Dec-07 2:50
hdv21210-Dec-07 2:50 
GeneralRe: problem to load Data from form2 to form1.gridView Pin
CKnig10-Dec-07 2:56
CKnig10-Dec-07 2:56 
Generalchecking for a _ Pin
eyeseetee9-Dec-07 23:07
eyeseetee9-Dec-07 23:07 
GeneralRe: checking for a _ Pin
Bekjong9-Dec-07 23:24
Bekjong9-Dec-07 23:24 

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.