| protected void Page_Load(object sender, EventArgs e) |
| { |
| //Load the categories grid only the first tim the page is loaded |
| if (!IsPostBack) |
| { |
| //Load the categories grid |
| BindGrid(); |
| } |
| } |
| //Populate the GrdView with data |
| private void BindGrid() |
| { |
| //Get category from query string |
| string categoryId = Request.QueryString["CategoryID"]; |
| //Get a DataTable object containing the categories |
| grid.DataSource = CatalogAccess.CatalogGetCategories(); |
| //Bind the data to the grid |
| grid.DataBind(); |
| } |
| //Enter row into edit mode |
| protected void grid_RowEditing(object sender, GridViewEditEventArgs e) |
| { |
| //set the row for which to enale edit mode |
| grid.EditIndex = e.NewEditIndex; |
| //set status message |
| statusLabel.Text = "Editing row " + e.NewEditIndex.ToString(); |
| //Reload the grid |
| BindGrid(); |
| } |
| protected void grid_RowUpdating(object sender, GridViewUpdateEventArgs e) |
| { |
| //retrieve the updated data |
| string id = grid.DataKeys[e.RowIndex].Value.ToString(); |
| string name = ((TextBox)grid.Rows[e.RowIndex].Cells[0].Controls[0]).Text; |
| string description = ((TextBox)grid.Rows[e.RowIndex].FindControl("descriptionTextBox")).Text; |
| //execute the update command |
| bool success = CatalogAccess.UpdateCategory(id, name, description); |
| //cancel edit mode |
| grid.EditIndex = -1; |
| //display status message |
| statusLabel.Text = success ? "Update successful" : "Update failed"; |
| //reload the grid |
| BindGrid(); |
| } |
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnBack">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="tp"/>
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btnForward">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="tp"/>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
Why is it that only the top control works but the Manager ignores the other?
Thanks