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

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()

I think you should add the row\column to the DataTable(The Data Source of the Grid) then bind the Grid again.

Dim newRow as DataRow = yourDatagrid.newrow()

newRow.Item(0) = "yourText"
etc. etc. etc.

yourDatagrid.rows.add(newRow)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.