This is a migrated thread and some comments may be shown as answers.

[Solved] Delete Selected Row From Radgrid

1 Answer 608 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 15 Feb 2010, 10:30 AM
Want to delete the selected row from radgird ?
 how to delete the row from Radgrid in vb.net


Need Urgent

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Feb 2010, 05:24 AM
Hello Rahul,

You can set the CommandName for the button as DeleteSelected if the button is placed in CommandItemTemplate of grid. This is shown in the following demo.
Command Item

Also you can try the following code to achieve the same, instead of setting CommandName.
CS:
 
Protected Sub Button2_Click(ByVal sender As ObjectByVal e As EventArgs) 
    Dim item As GridDataItem = DirectCast(RadGrid1.SelectedItems(0), GridDataItem) 
    item.FireCommandEvent("Delete", [String].Empty) 
End Sub 
 

-Shinu.
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or