Manual Data Display in Data Grid

pad

Member
Joined
Jan 18, 2005
Messages
14
Programming Experience
5-10
Hi
How to display the data manually (not using binding methods and just like flexgrid style data display) in data grid. i need the simple coding for that...

Tx in advance...
 
pad said:
Hi
How to display the data manually (not using binding methods and just like flexgrid style data display) in data grid. i need the simple coding for that...

Tx in advance...

i think you can't use the datagrid w/out binding a datatable to it.
if you want a manual to put a value in a datagrid
make a datatable,datacolumn and row
and here's how to do it.
PHP:
Dim dt As New DataTable()
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        dt.Columns.Add(New DataColumn("Name"))
    End Sub
'to add data to your datagrid
Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim r As DataRow = dt.NewRow
        r(0) = TextBox1.Text
        dt.Rows.Add(r)
        DataGrid1.DataSource = dt
    End Sub
 
Back
Top