FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister  MasterVB.NET
Visual Basic 2005 .NET Forum
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
insert row by row from tect box's to datagrid
 
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Visual Basic .NET General Discussion
View previous topic :: View next topic  
Message
Author
Ragia
Newbie
Joined: 15 Jul 2006
Posts: 7

PostPosted: Fri Jul 21, 2006 1:00 pm    
Post subject: insert row by row from tect box's to datagrid
Reply with quote

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



 

Back to top
View user's profile Send private message
Author
Tito
Beginner
Joined: 15 Jul 2006
Posts: 57

PostPosted: Sat Jul 22, 2006 1:00 pm    
Post subject:
Reply with quote

If you use a DataGridView, you can simple add a row by:
int RowNumber = DataGridView.Rows.Count DataGridView.Rows.Add()
DataGridView.Rows[RowNumber].Cells[0].Value = Day Name DataGridView.Rows[RowNumber].Cells[1].Value = From Time DataGridView.Rows[RowNumber].Cells[2].Value = To Time

If you have a DataGrid that is bound to an object like a DataTable DataRow NewRow = DataTable.NewRow()
NewRow[0] = Day Name NewRow[1] = From Time NewRow[2] = To Time DataTable.Rows.Add(NewRow)
DataGrid.DataSource = DataTable

Is this what you were looking for?



 

Back to top
View user's profile Send private message
Author
Ragia
Newbie
Joined: 15 Jul 2006
Posts: 7

PostPosted: Mon Jul 24, 2006 1:00 pm    
Post subject:
Reply with quote

Yes Smile thanks



 

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Visual Basic .NET General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Archieve

Powered by phpBB © 2001, 2002 phpBB Group, used in Visual Basic 2005 .NET Forum

| Visual Basic .NET Forum | Online Recipe Archiver | Shareware Freeware PAD | Lowongan Kerja | Kamus Online | Health Supply | Digital Camera Review |
Orang Paling Keren

RSS