or
<telerik:RadChart ID="ComplianceScoreChart" runat="server" ChartImageFormat="Jpeg" SeriesOrientation="Horizontal"
Height="100px" Width="200px" UseSession="false">
<
add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
Hi,
I would like to know how to put the grid in the edit mode once the record is inserted.
I am using telerik radgrid with editmode="Editforms" and EditFormType="Template"
Insert action is handled in the code behind.
Once record is inserted, I would like the grid to go into edit mode.
I would appreciate help with this.
Thanks,
Manisha

protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem item = e.Item as GridEditableItem; GridEditManager manager = item.EditManager; GridTextBoxColumnEditor editor = manager.GetColumnEditor("EventID") as GridTextBoxColumnEditor; GridTextBoxColumnEditor editor2 = manager.GetColumnEditor("DateCreated") as GridTextBoxColumnEditor; if (!(e.Item is GridEditFormInsertItem)) //edit record { editor.TextBoxControl.Enabled = false; editor2.TextBoxControl.Enabled = false; } else //add record { editor.TextBoxControl.Visible = false; editor2.TextBoxControl.Visible = false; } } }<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SeriesClickedIndependant.aspx.cs" Inherits="SeriesClicked.SeriesClickedIndependant" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest" runat="server"> </telerik:RadAjaxManager> <telerik:RadHtmlChart ID="RadHtmlChart1" OnClientSeriesClicked="OnClientSeriesClicked" runat="server"> </telerik:RadHtmlChart> <script type="text/javascript"> function OnClientSeriesClicked(sender, eventArgs) { //alert("You clicked on a series item with value '" + eventArgs.get_value() + "' from category '" + eventArgs.get_category() + " and Series:" + eventArgs.get_seriesName() + '.'); $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(eventArgs.get_seriesName()); } </script> </div> </form></body></html>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Reports.ReportPresenter;using Telerik.Web.UI;namespace SeriesClicked{ public partial class SeriesClickedIndependant : System.Web.UI.Page { private ReportsDataSource _radDataSource; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PreFetch(); FetchData(ReportsStoredProcedures.StoredProcedures.Company, new ReportsParameters(1356, "01/01/2011", "05/30/2011")); PostFetch(); } } public void FetchData(ReportsStoredProcedures.StoredProcedures storedProcedure, ReportsParameters parameters) { //Populates the DataSource that will be used by the RADHTMLChart _radDataSource = new ReportsPresenter().GetReportsDataSource(storedProcedure, parameters); } public void PostFetch() { foreach (LineSeries lS in _radDataSource.ReportsRadHtmlSource.SeriesCollection) { RadHtmlChart1.PlotArea.Series.Add(lS); } foreach (string s in _radDataSource.ReportsRadHtmlSource.LabelsArray) { RadHtmlChart1.PlotArea.XAxis.Items.Add(s); } } public void PreFetch() { RadHtmlChart1.PlotArea.Series.Clear(); } protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) { PreFetch(); FetchData(ReportsStoredProcedures.StoredProcedures.Region, new ReportsParameters(1356, 1356, 0, Reports.DataAccess.Facility.FacilityType.Regional, "01/01/2011", "05/30/2011")); PostFetch(); } public void FetchData() { } }}
<script type="text/javascript"> function openRadWin(code, bookingdate, category) { radopen("MyPage.aspx", "RadWindow1"); }</script> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" VisibleStatusbar="false"> <Windows> <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="400px" Height="400px" Title="Telerik RadWindow" Behaviors="Default" > </telerik:RadWindow> </Windows></telerik:RadWindowManager>Server Error in '/' Application.Failed to load viewstate. The control tree into which viewstate
is being loaded must match the control tree that was used to save
viewstate during the previous request. For example, when adding
controls dynamically, the controls added during a post-back must
match the type and position of the controls added during the initial request.