I'm building an application that uses RadGrid and I want to know is there a way to delete a row(and the DataItem) from the RadGrid using only JavaScript.
You can make use of the GridClientDeleteColumn provided by the RadGrid for a client-side delete which allows you to erase records without making a round trip to the server.
Please take a look at the following for a working demo on how to achieve this:
I'm aware of this samples. I'm not using Web Service or any kind of DataSource(SqlDataSouce etc.). I bind the grid to my own collection of objects at the OnLoad() of the page. I'm setting the ClientDataKeyNames,DataKeyNames properties of the grid to the ID property of my objects. So when, as shown in second sample, I try the following code:
var table = $find("<%= RadGrid1.ClientID %>").get_masterTableView().get_element();