| | |
Dynamically adding row to datagrid
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2009
Posts: 12
Reputation:
Solved Threads: 0
Is anyone have idea of how we add new row in datagrid I want to add DR and CR Column in datagrid view DataGrid View have 4 column Sr#, Discription, DR, CR
VB.NET Syntax (Toggle Plain Text)
Dim DR As Decimal Dim CR As Decimal DR = DataGridViewCashBook.Rows(index).Cells(4).Value.ToString() CR = DataGridViewCashBook.Rows(index).Cells(5).Value.ToString() DataGridViewBankStatment.Rows.Add()
Last edited by farooq82; Feb 8th, 2009 at 5:07 pm.
I think you should add the row\column to the DataTable(The Data Source of the Grid) then bind the Grid again.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
•
•
Join Date: Nov 2008
Posts: 63
Reputation:
Solved Threads: 10
VB.NET Syntax (Toggle Plain Text)
Dim newRow as DataRow = yourDatagrid.newrow() newRow.Item(0) = "yourText" etc. etc. etc. yourDatagrid.rows.add(newRow)
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Previous Thread: Hide Unuse Column in DataGrid
- Next Thread: Publishing worries
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex right-to-left save search searchvb.net select serial settings shutdown soap socket sqldatbase sqlserver survey table temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year






