Strona: [  << <   1   > >>  ]  z  1     
Autor Temat: polaczenie z gridem?
mink




Typ: neutral
Postów: 3
Zarejestrowany: Mar 2005
polaczenie z gridem?

chcialbym utworzyc polaczenie pomiedzy textbox1 a grdDane_Navigate na zasadzie - wpisuje nr i podswietla sie linia w gridzie o tym numerze! W razie czego moge przeslac screena na maila lub w inny sposob zeby zobrazowac to o czym mowie. DZIEKI

Imports System.Data.SqlClient

Public Class DataForm1
    Inherits System.Windows.Forms.Form

  Private Sub DataForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim c As SqlConnection = New SqlConnection("data source=(local);initial catalog=kondor;integrated security=SSPI"
        Dim da As SqlDataAdapter = New SqlDataAdapter("select * from DANE", c)
        Dim ds As DataSet = New DataSet
        da.Fill(ds, "dane"
        Me.grdDane.DataSource = ds
        Me.grdDane.DataMember = "dane"

        Try
            'Attempt to load the dataset.
            Me.LoadDataSet()
        Catch eLoad As System.Exception
            'Add your error handling code here.
            'Display error message, if any.
            System.Windows.Forms.MessageBox.Show(eLoad.Message)
        End Try

    End Sub

    Private Sub grdDane_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles grdDane.Navigate
        Try
            'Attempt to load the dataset.
            Me.LoadDataSet()
        Catch eLoad As System.Exception
            'Add your error handling code here.
            'Display error message, if any.
            System.Windows.Forms.MessageBox.Show(eLoad.Message)
        End Try

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
       
        If Not IsNumeric(TextBox1.Text) Then TextBox1.Text = ""

    End Sub

06-03-2005 17:26
Pokaż profil mink  Wyślij email do mink   
Wszystkich odpowiedzi: 0 :: Maxymalnie na stronę: 20
Strona: [  << <   1   > >>  ]  z  1