I have an Update button in template editForm. My problem is that I cannot implement the button. I have seen this demo (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx) and tried to implement the RadGrid1_UpdateCommand event handler, but I got compilation errors for this line:
The errors are:
1. "The best overloaded method match for 'System.Web.UI.WebControls.SqlDataSource.Select(System.Web.UI.DataSourceSelectArguments)' has some invalid arguments"
2. "Argument 1: cannot convert from 'string' to 'System.Web.UI.DataSourceSelectArguments'"
Can anyone help me on this?
Here's the code for the UpdateCommand event handler:
DataRow[] changedRows = this.UserDataSource.Select("user_id = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Users"]);
The errors are:
1. "The best overloaded method match for 'System.Web.UI.WebControls.SqlDataSource.Select(System.Web.UI.DataSourceSelectArguments)' has some invalid arguments"
2. "Argument 1: cannot convert from 'string' to 'System.Web.UI.DataSourceSelectArguments'"
Can anyone help me on this?
Here's the code for the UpdateCommand event handler:
protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
//Prepare new row to add it in the DataSource
DataRow[] changedRows = this.UserDataSource.Select("user_id = " +
editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Users"]);
// in progress. to be implemented here
}