or
<telerik:GridEditCommandColumn ButtonType="ImageButton" >
<HeaderStyle Width="10%" />
</telerik:GridEditCommandColumn>
When the user clicks on it, they are send to a different window to edit the item
protected void gridGroups_ItemCommand1(object source, GridCommandEventArgs e)
{
if (e.CommandName == "Edit")
{
Response.Redirect(...);
}
}
When the user returns to the page with the grid on it and clicks on edit again nothing happens. It doesn't go into the ItemCommand event handler at all?
Anyone seen this behaviour before?
Thanks
Emmet


| protected void rgFamilies_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode) |
| { |
| GridDateTimeColumnEditor dtpDate = editItem.EditManager.GetColumnEditor("BirthDate") as GridDateTimeColumnEditor; |
| dtpDate.PickerControl.MinDate = new DateTime(1900, 1, 1); |
| dtpDate.DataBind(); |
| } |
| } |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| RadGrid1 = new RadGrid(); |
| RadGrid1.AutoGenerateColumns = true; |
| RadGrid1.ItemCommand += new GridCommandEventHandler(LVRadGridView_ItemCommand); |
| RadGrid1.AllowMultiRowSelection = true; |
| RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric; |
| RadGrid1.ClientSettings.Selecting.AllowRowSelect = true; |
| RadGrid1.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; |
| RadGrid1.MasterTableView.AutoGenerateColumns = true; |
| RadGrid1.MasterTableView.ClientDataKeyNames = new string[] { "ID" }; |
| RadGrid1.MasterTableView.CommandItemTemplate = new FolderViewerCommandItemTemplate(); |
| GridClientSelectColumn checkBoxColumn = new GridClientSelectColumn(); |
| RadGrid1.Columns.Add(checkBoxColumn); |
| BindGrid(); |
| PlaceHolder1.Controls.Add(RadGrid1); |
| } |
| public void BindGrid() |
| { |
| DataTable tab = new DataTable(); |
| tab.Columns.Add("ID"); |
| tab.Columns.Add("Color"); |
| tab.Rows.Add(1, "Red"); |
| tab.Rows.Add(2, "Orange"); |
| tab.Rows.Add(3, "Yellow"); |
| tab.Rows.Add(4, "Green"); |
| tab.Rows.Add(5, "Blue"); |
| tab.AcceptChanges(); |
| RadGrid1.DataSource = tab; |
| RadGrid1.DataBind(); |
| } |
| void LVRadGridView_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| ... |
| } |