Visual Basic .NET » Visual Basic .NET General Discussion
insert row by row from tect box's to datagrid -- Ragia --


hi all i have 2 text boxes that will contain from and to time+list box contain week days to make schedual for certain subject i want datagrid row to appear when user clicks the add row button ??so finaly datagrid will containd day name from time to time as row how can i make that?
if you imagin other way to make such schedual pleas reply thanks in advance

-- Tito --


If you use a DataGridView, you can simple add a row by:
int RowNumber = DataGridView.Rows.Count DataGridView.Rows.Add()
DataGridView.Rows
.Value = To Time

If you have a DataGrid that is bound to an object like a DataTable DataRow NewRow = DataTable.NewRow()
NewRow
= To Time DataTable.Rows.Add(NewRow)
DataGrid.DataSource = DataTable

Is this what you were looking for?

-- Ragia --


Yes :) thanks

[Submit Comment]Home