|
-
Jan 15th, 2008, 11:48 PM
#1
Thread Starter
Fanatic Member
Data table
I have datagrid and button on web form . I want to add row on each button
Click by using datatable, how should i do this . by insertat or ,rowadd Method??
-
Jan 16th, 2008, 01:41 AM
#2
Re: Data table
I guess you'll be using one of the "System.Windows.Forms.DataGridView.Rows.Add();" overloads unless you want to specify the row index then use the System.Windows.Forms.DataGridView.Rows.Insert();
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jan 16th, 2008, 02:35 PM
#3
Fanatic Member
Re: Data table
@ComputerJy, what ERUM is asking for is web control related and hence Rows.Insert() 0r Rows.Add() won't work. Moreover, DatagridView is for windows forms.
-
Jan 16th, 2008, 03:00 PM
#4
Re: Data table
 Originally Posted by rjv_rnjn
@ComputerJy, what ERUM is asking for is web control related and hence Rows.Insert() 0r Rows.Add() won't work. Moreover, DatagridView is for windows forms.
Sorry, I must have miss-read this the first time.
Anyways, the InsertAt method is used when you want to specify the row index
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Jan 17th, 2008, 05:05 PM
#5
Re: Data table
Create a datarow object. Set it to be the datatable's newrow method's return value. Once you have it, populate it with 'blank' values, then add it to the datatable. Then rebind your gridview to the datatable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|