hi friend can any one give a solution for
deleting or removing the particular column in the datadialgrid in vb.net
and deleting particular row in the datadialgrid in the vb.net
regards
vijay
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
kiran kumarRank #3,110 · 461 reputationPosted Feb 26, 2010, 9:06 PM EST
i have uploaded for adding rows and cols dynamically,check it out
Amit ChoudharyRank #145 · 15.8K reputationPosted Feb 26, 2010, 9:13 PM EST
For deleting row:
Dim Dr As DataRow
Dr = DtSalesReport.Rows.Item(dgvSalesReport.CurrentRow. Index)
Dr.Delete()
DtSalesReport.AcceptChanges()
For Deleting a column checkout the following link:
http://www.daniweb.com/forums/thread147751.html
Please don't forget to mark the answer if it helps you.
vijay antony43 reputationPosted Feb 26, 2010, 9:16 PM EST
i did not get any uploaded document kiran
kiran kumarRank #3,110 · 461 reputationPosted Feb 26, 2010, 9:29 PM EST
ok man i will help you in this topic also with code
kiran kumarRank #3,110 · 461 reputationPosted Feb 26, 2010, 10:10 PM EST
i will explain about the code here
first enter the column name to delete
in my project column names are column1,column2,column3
and then click the delete col button to delete that particular column
then coming to next one,enter the number of rows to be added and click add rows button,rows will be added up in the grid
then coming to next one select the row to be deleted in the datagrid, just click on the small arrowmark of the desired row to be deleted and click on the button select row and click me to delete
mark the answer if it helps you
paul daniel189 reputationPosted Mar 1, 2010, 9:11 PM EST
Private Sub CustomersGridView_RowDeleting _ (ByVal sender As [Object], _ ByVal e As GridViewDeleteEventArgs) Dim cell As TableCell cell = CustomersGridView.Rows(e.RowIndex).Cells(2) If cell.Text = "Beaver" Then e.Cancel = True Message.Text = "You cannot delete customer Beaver." Else Message.Text = "" End If End Sub