DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   VB.NET (http://www.daniweb.com/forums/forum58.html)
-   -   devexpress gridview delete button/edit (http://www.daniweb.com/forums/thread167258.html)

sam1 Jan 9th, 2009 12:26 pm
devexpress gridview delete button/edit
 
hi,

how can i add a button to delete/edit a row in gridview which takes its data from database ?

thanks

rapture Jan 9th, 2009 1:37 pm
Re: devexpress gridview delete button/edit
 
you code it in the button click event

rapture Jan 9th, 2009 1:48 pm
Re: devexpress gridview delete button/edit
 
hey I'll even go one step further

Private Sub btnDelete_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles btnDelete.Click
    If Not DataGridView1.CurrentRow.IsNewRow Then
        DataGridView1.Rows.Remove(DataGridView1.CurrentRow)
    End If
End Sub

but it's not my code - it popped up by googling what you want

http://www.vb-helper.com/howto_2005_...elete_row.html

sam1 Jan 12th, 2009 5:16 am
Re: devexpress gridview delete button/edit
 
thank you both i will try it now. but one question how do i insert a button for each row in gridview?

sam1 Jan 12th, 2009 7:13 am
Re: devexpress gridview delete button/edit
 
^^^^ AnyOne on this please

rapture Jan 12th, 2009 9:58 am
Re: devexpress gridview delete button/edit
 
I've not done this myself, I did find some things by searching . . .

I googled gridview embed a button for each row


looks like you're going to use itemtemplate to do this


All times are GMT -4. The time now is 6:04 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC