edora Posted August 22, 2003 Posted August 22, 2003 Hi guys, another problem i facing in datagrid. I want to delete the row inside my datagrid whenever i check the checkbox. It seems that my code below is correct, but when i check the checkbox, and click the delete button, it fail to perform as what i want. Can anyone help me? I've attach my interface for reference. Private Sub cmdButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdButton.Click For Each m_check In myDataGrid.Columns If m_check.DataItem = True Then m_objSMS.delete(m_check.DataItem(2).Text) MsgBox("Are You Sure You want to delete this record?") End If Next End Subuntitled.bmp Quote
Moderators Robby Posted August 22, 2003 Moderators Posted August 22, 2003 What is the value of 'm_check.DataItem(2).Text' when you trace it? Quote Visit...Bassic Software
edora Posted August 22, 2003 Author Posted August 22, 2003 when i trace it, it give me value = nothing Quote
edora Posted August 22, 2003 Author Posted August 22, 2003 Is there any better code to replace this code? thanks Quote
edora Posted September 17, 2003 Author Posted September 17, 2003 Have solved this problem, thanks for your help anyway robby Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.