Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: WPF error on VS2008 Pin
Pete O'Hanlon22-Mar-12 10:34
mvePete O'Hanlon22-Mar-12 10:34 
GeneralRe: WPF error on VS2008 Pin
jsdhgkjdsahklg23-Mar-12 20:13
jsdhgkjdsahklg23-Mar-12 20:13 
AnswerRe: WPF error on VS2008 Pin
Eddy Vluggen22-Mar-12 11:13
professionalEddy Vluggen22-Mar-12 11:13 
AnswerRe: WPF error on VS2008 Pin
Pete O'Hanlon22-Mar-12 8:38
mvePete O'Hanlon22-Mar-12 8:38 
GeneralRe: WPF error on VS2008 Pin
jsdhgkjdsahklg22-Mar-12 10:01
jsdhgkjdsahklg22-Mar-12 10:01 
GeneralRe: WPF error on VS2008 Pin
Pete O'Hanlon22-Mar-12 10:21
mvePete O'Hanlon22-Mar-12 10:21 
GeneralRe: WPF error on VS2008 Pin
jsdhgkjdsahklg23-Mar-12 20:39
jsdhgkjdsahklg23-Mar-12 20:39 
Questionruntime issue Pin
nitish_0722-Mar-12 3:23
nitish_0722-Mar-12 3:23 
I am creating a new tab onclick of a menu item at run time.....and in this tab i have to add a datagridview..and there is text box and execute button outside this tab...
when i write any query and press execute then the result should be displayed on dridview..bt the problem is i m creating gridview at run time while user clicks an new query tab on menu...so problem is how to take reference of this gridview when i m doing coding on execute button...Like...Here i Have create that tabpage.
C#
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
      {
          Class1.res++;

          string s="ResultSet"+" "+Class1.res;
          TabPage tp = new TabPage(s);
          tabControl1.TabPages.Add(tp);
          tabControl1.SelectedTab = tp;
          


      }


and on execute button i am doing this code..
OdbcCommand cm = new OdbcCommand(richTextBox1.Text,cn);
cm.ExecuteNonQuery();
OdbcDataAdapter ad =new OdbcDataAdapter(richTextBox1.Text, cn);
DataSet dst = new DataSet();
if (dst.Tables["R"] != null)
{                                    dst.Tables["R"].Clear();
}
ad.Fill(dst, "R");
if (dst.Tables["R"].Rows.Count > 0)                                {
DataGridView dgv = new DataGridView();
dgv.ReadOnly = true;
dgv.BackgroundColor = Color.White;
dgv.DataSource = dst;
dgv.DataMember = "R";

}
..

While i am doing this it is not showing any result.....actually i have to add gridview on tab page...bt according to this code tab page is not available at design time......so plz provide any solution...
AnswerRe: runtime issue Pin
PIEBALDconsult22-Mar-12 3:37
mvePIEBALDconsult22-Mar-12 3:37 
GeneralRe: runtime issue Pin
nitish_0722-Mar-12 4:38
nitish_0722-Mar-12 4:38 
Questioncode server c# Pin
heba abu ghaleih22 22-Mar-12 2:04
heba abu ghaleih22 22-Mar-12 2:04 
AnswerRe: code server c# Pin
Ravi Bhavnani22-Mar-12 2:11
professionalRavi Bhavnani22-Mar-12 2:11 
GeneralRe: code server c# Pin
heba abu ghaleih22 22-Mar-12 2:25
heba abu ghaleih22 22-Mar-12 2:25 
AnswerRe: code server c# Pin
Ravi Bhavnani22-Mar-12 2:28
professionalRavi Bhavnani22-Mar-12 2:28 
GeneralRe: code server c# Pin
heba abu ghaleih22 22-Mar-12 2:44
heba abu ghaleih22 22-Mar-12 2:44 
Questionserver Pin
heba abu ghaleih22 22-Mar-12 1:45
heba abu ghaleih22 22-Mar-12 1:45 
AnswerRe: server Pin
Ravi Bhavnani22-Mar-12 2:09
professionalRavi Bhavnani22-Mar-12 2:09 
AnswerRe: server PinPopular
Pete O'Hanlon22-Mar-12 2:14
mvePete O'Hanlon22-Mar-12 2:14 
GeneralRe: server Pin
heba abu ghaleih22 22-Mar-12 2:33
heba abu ghaleih22 22-Mar-12 2:33 
GeneralRegarding source code of C# Pin
Rohit Srivastav22-Mar-12 1:05
Rohit Srivastav22-Mar-12 1:05 
GeneralRe: Regarding source code of C# Pin
Wes Aday22-Mar-12 1:33
professionalWes Aday22-Mar-12 1:33 
GeneralRe: Regarding source code of C# Pin
Rohit Srivastav22-Mar-12 2:24
Rohit Srivastav22-Mar-12 2:24 
GeneralRe: Regarding source code of C# Pin
Vipin_Arora22-Mar-12 2:33
Vipin_Arora22-Mar-12 2:33 
GeneralRe: Regarding source code of C# Pin
Rohit Srivastav22-Mar-12 4:30
Rohit Srivastav22-Mar-12 4:30 
GeneralRe: Regarding source code of C# Pin
Vipin_Arora22-Mar-12 19:26
Vipin_Arora22-Mar-12 19:26 

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.