Iamateur's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
Active Members
Active Posts:
62 (0.09 per day)
Joined:
20-April 12
Profile Views:
268
Last Active:
User is offline May 28 2012 08:29 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   Iamateur has not set their status

Posts I've Made

  1. In Topic: Close X button code not working as expected

    Posted 28 May 2012

    View Postm_wylie85, on 28 May 2012 - 02:27 AM, said:

    Try putting your code in then form closing or form closed event and see what happens. Links to boths these event are below:

    http://msdn.microsof...formclosed.aspx

    http://msdn.microsof...rm.closing.aspx

    Yea I had written that code in formclosing event.
  2. In Topic: CRYSTAL REPORT DATA SET WINDOWS FORM CODING

    Posted 14 May 2012

    View Postpolens, on 14 May 2012 - 02:10 AM, said:

    try this:
    rpt.SetDataSource(ds.tables(0))
    

    you need to specify what table you want to feed to the crystal report


    The above reply dint help out :/
  3. In Topic: Is it possible to show only particular records in gridview with req.

    Posted 14 May 2012

    View Postpolens, on 14 May 2012 - 12:14 AM, said:

    query should have BETWEEN CLAUSE or use Greater or Less than symbols to get the data . .


    Ok as per your reply I did like this:
    ElseIf ((dr(0).ToString() >= TextBox1.Text) And (dr(0).ToString() <= TextBox2.Text)) Then
                DataGridView1.Rows(i).Cells(0).Value.ToString()
                DataGridView1.Rows(i).Cells(1).Value.ToString()
                DataGridView1.Rows(i).Cells(2).Value.ToString()
                DataGridView1.Rows(i).Cells(3).Value.ToString()
                DataGridView1.Rows(i).Cells(4).Value.ToString()
    


    But still its not working dear.
  4. In Topic: Is it possible to show only particular records in gridview with req.

    Posted 13 May 2012

    2 textboxes to accept fromdate and todate and check with the database column of ida,rda and if matches then display only that row.
    I tried it in the below way but not able to do.
    con.Open()
            i = DataGridView1.CurrentCell.RowIndex
            cmd = New SqlCommand("SELECT COUNT(*) FROM IssueMBA WHERE ida='" + TextBox1.Text + "'and  rda='" + TextBox2.Text + "'", con)
            dr = cmd.ExecuteReader()
            If Not dr.Read() Then
                MsgBox("Invalid details")
            ElseIf ((dr(3).ToString() = TextBox1.Text) And (dr(4).ToString() = TextBox2.Text)) Then
                DataGridView1.Rows(i).Cells(0).Value.ToString()
                DataGridView1.Rows(i).Cells(1).Value.ToString()
                DataGridView1.Rows(i).Cells(2).Value.ToString()
                DataGridView1.Rows(i).Cells(3).Value.ToString()
                DataGridView1.Rows(i).Cells(4).Value.ToString()
            End If
    
    
    
    
            con.Close()
    
  5. In Topic: Is it possible to show only particular records in gridview with req.

    Posted 13 May 2012

    View PostNerfpl, on 13 May 2012 - 08:22 AM, said:

    Parse your textbox to DateTime and compare 2 DataTime objects.


    Can you please elaborate?
    I tried to do in this way.
    con.Open()
            cmd = New SqlCommand("SELECT COUNT(*) FROM IssueMBA WHERE ida=textbox1.text,rda=textbox2.text", con)
            dr = cmd.ExecuteReader()
            If Not dr.Read() Then
                MsgBox("Invalid details")
            ElseIf 
    

    After **ElseIf** I am not able to write exact code.
    I want to show those particular rows in the gridview and that code should be shown in else part.

    View PostNerfpl, on 13 May 2012 - 08:22 AM, said:

    Parse your textbox to DateTime and compare 2 DataTime objects.


    Did you mean in this way?
    frmDate = Date.Parse(TextBox1.Text)
            toDate = Date.Parse(TextBox2.Text)
            call1(frmDate, toDate)
    


    But then how to show it in datagridview?
    I want to show that particular row.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

Iamateur hasn't added any friends yet.

Comments

Iamateur has no profile comments yet. Why not say hello?