I'm editing radgrid using template
here is my code
<
EditFormSettings EditFormType="Template">
<FormTemplate>
<table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" >
<tr class="EditFormHeader">
<td colspan="2" style="font-size: small"><b>Name</b></td>
<td><asp:TextBox runat="server" ID="Name" Width="250px" Text='<%# Bind("Name") %>' /></td>
</tr>
<tr class="EditFormHeader">
<td colspan="2" style="font-size: small">
<b>Title</b>
</td>
<td><asp:TextBox runat="server" ID="Title" Width="250px" Text='<%# Bind("Title") %>' /></td>
</tr>
I am updating from code behind
protected
void radgrid_UpdateCommand(object source, GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
TextBox txtName = (TextBox)editedItem.FindControl("Name");
string Name = txtName .Text;
TextBox txtTitle = (TextBox)editedItem.FindControl("Title");
string Title = txtTitle.Text;
}
But this update 'Name' and 'Title' returns the old values not the updated one.
Need help.
I have one asp.net website application. In this application i used rad-control . now i installed the teleric rad control . But i am getting the following error. Bcz its working fine in production server . I dont know much more about this application . Now i configured my application in locally for enhancement. Now my doubt is just installtion is required or whether we want to add any refernce to bin folder or not. If yes tell me. Other wise plz provide some tips to resolve this issue
Error Creating Control - Rad Window Manager1
Unknown server tag rad:RadWindowManager
----------------------
Error Creting Control LoginView1
Unknow server tag 'ajax tool kit:validator call out extender
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Order2.aspx.cs" Inherits="Test.Order2" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<!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
>Untitled Page</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
div
>
<!-- content start -->
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"RadGrid2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid2"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox1"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox2"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid2"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox3"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"CheckBox4"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadGrid2"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
/>
<
br
/>
<
br
/>
<
h3
class
=
"qsfSubtitle"
>
Grid with ClientSideSelectColumn</
h3
>
<
telerik:RadGrid
ID
=
"RadGrid2"
AllowMultiRowSelection
=
"true"
runat
=
"server"
AllowSorting
=
"True"
GridLines
=
"None"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"ClientSelectColumn"
/>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
<
br
/>
<
asp:Button
CssClass
=
"button"
Text
=
"PostBack"
runat
=
"server"
ID
=
"Button1"
Style
=
"margin: 10px 22px 10px 0px"
>
</
asp:Button
>
Click PostBack to see the state of the grids is preserved.
</
div
>
</
form
>
</
body
>
</
html
>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace Test
{
public partial class Order2 : System.Web.UI.Page
{
protected void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = this.CreateDataTable();
this.AddRowsToDataTable(dt);
this.RadGrid2.DataSource = dt;
this.RadGrid2.DataBind();
}
}
protected DataTable CreateDataTable()
{
DataTable dt = new DataTable();
DataColumn dc;
dc = new DataColumn("Column 1");
dt.Columns.Add(dc);
dc = new DataColumn("Column 2");
dt.Columns.Add(dc);
dc = new DataColumn("Column 3");
dt.Columns.Add(dc);
dc = new DataColumn("Column 4");
dt.Columns.Add(dc);
dc = new DataColumn("Column 5");
dt.Columns.Add(dc);
return dt;
}
protected void AddRowsToDataTable(DataTable dt)
{
for (int i = 0; i < 5; i++)
{
DataRow dr = dt.NewRow();
dr[0] = i.ToString();
dr[1] = (i * 2).ToString();
dr[2] = (i * 3).ToString();
dr[3] = (i * 4).ToString();
dr[4] = (i * 5).ToString();
dt.Rows.Add(dr);
}
}
}
}
//------------------------------------------------------------------------------
// <
auto-generated
>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3623
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </
auto-generated
>
//------------------------------------------------------------------------------
namespace Test {
public partial class Order2 {
/// <
summary
>
/// form1 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <
summary
>
/// RadScriptManager1 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::Telerik.Web.UI.RadScriptManager RadScriptManager1;
/// <
summary
>
/// RadAjaxManager1 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::Telerik.Web.UI.RadAjaxManager RadAjaxManager1;
/// <
summary
>
/// RadAjaxLoadingPanel1 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::Telerik.Web.UI.RadAjaxLoadingPanel RadAjaxLoadingPanel1;
/// <
summary
>
/// RadGrid2 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::Telerik.Web.UI.RadGrid RadGrid2;
/// <
summary
>
/// Button1 control.
/// </
summary
>
/// <
remarks
>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </
remarks
>
protected global::System.Web.UI.WebControls.Button Button1;
}
}
System.ArgumentException: Object of type 'Telerik.Web.UI.HourlyRecurrenceRule' cannot be converted to type 'Telerik.Web.UI.RecurrenceRule'. |
at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr) |
at System.Reflection.RtFieldInfo.InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, Boolean doVisibilityCheck, Boolean doCheckConsistency) |
at System.Reflection.RtFieldInfo.InternalSetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture, Boolean doVisibilityCheck) |
at System.Runtime.Serialization.FormatterServices.SerializationSetValue(MemberInfo fi, Object target, Object value) |
at System.Runtime.Serialization.ObjectManager.CompleteObject(ObjectHolder holder, Boolean bObjectFullyComplete) |
at System.Runtime.Serialization.ObjectManager.DoNewlyRegisteredObjectFixups(ObjectHolder holder) |
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder) |
at System.Runtime.Serialization.ObjectManager.DoFixups() |
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) |
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) |
at System.EnterpriseServices.ComponentSerializer.UnmarshalFromBuffer(Byte[] b, Object tp) |
at System.EnterpriseServices.ComponentServices.ConvertToMessage(String s, Object tp) |
at System.EnterpriseServices.ServicedComponent.RemoteDispatchHelper(String s, Boolean& failed) |
at System.EnterpriseServices.ServicedComponent.System.EnterpriseServices.IRemoteDispatch.RemoteDispatchAutoDone(String s) |
at System.EnterpriseServices.IRemoteDispatch.RemoteDispatchAutoDone(String s) at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg) |
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) |
at Application.ControlScheduler.ControlScheduleFacade.UpdateControlSchedule(ControlSchedule schedule, String userName) |
at Web.Control.ScheduleProvider.Update(RadScheduler owner, Appointment appointmentToUpdate) |
at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointmentThroughProvider(Appointment appointmentToUpdate) |
at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(Appointment originalAppointment, Appointment modifiedAppointment) |
at Telerik.Web.UI.WebServiceAppointmentController.UpdateAppointment[T](ISchedulerInfo schedulerInfo, T appointmentData) |
at Telerik.Web.UI.WebServiceAppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, AppointmentData appointmentData) |
at Web.Control.SchedulerWebService.UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) |
<
telerik:GridHyperLinkColumn
HeaderText
=
""
UniqueName
=
"View"
DataTextField
=
"CheckType"
DataTextFormatString
=
"View"
DataNavigateUrlFields
=
"CheckNumber,CheckType"
DataNavigateUrlFormatString
=
"javascript:ViewCheck({0},'{1}')"
>
<
HeaderStyle
Width
=
"100px"
/>
<
ItemStyle
HorizontalAlign
=
"Right"
/>
</
telerik:GridHyperLinkColumn
>
//When the user drops a RadListBoxItem onto the dashboard we have to figure out
//what RadDockZone the control was dropped onto, rip out information about the event,
//and then pass that data to the server for processing.
function OnClientDropping(sender, eventArgs) {
eventArgs.set_cancel(
true
);
sender.clearSelection();
previousZone =
null
;
var sourceItem = eventArgs.get_sourceItem();
var droppedID = eventArgs.get_htmlElement().id;
if
(droppedID.indexOf(
"RadDockZone"
) != -1) {
var dockZoneDroppedOn = $find(droppedID);
if
(dockZoneDroppedOn.get_docks().length == 0) {
dockZoneDroppedOnID = droppedID;
var eventData = {};
eventData[
"sourceItemText"
] = sourceItem.get_text();
eventData[
"sourceItemValue"
] = sourceItem.get_value();
eventData[
"listBoxID"
] = sender.get_id();
if
(queue.length == 0) {
queue.push(dockZoneDroppedOn._uniqueID);
queue.push(eventData);
__doPostBack(dockZoneDroppedOn._uniqueID, $.toJSON(eventData));
}
else
{
queue.push(dockZoneDroppedOn._uniqueID);
queue.push(eventData);
}
}
}
else
{
dockZoneDroppedOnID =
""
;
}
}
<
cs:CormantRadPane
ID
=
"RadPane2"
Runat
=
"Server"
BackColor
=
"White"
>
<
nStuff:StyledUpdatePanel
Runat
=
"Server"
ID
=
"UpdatePanel1"
UpdateMode
=
"Conditional"
CssClass
=
"maxHeight"
>
<
ContentTemplate
>
<
cs:CormantRadSplitter
ID
=
"RadSplitter3"
Runat
=
"Server"
Visible
=
"false"
/>
<
cs:CormantRadDockZone
ID
=
"RadDockZone1"
Runat
=
"Server"
/>
</
ContentTemplate
>
</
nStuff:StyledUpdatePanel
>
</
cs:CormantRadPane
>
/// <summary>
/// Shows where docks can/can't be moved. Forbidden zones are all DockZone's with Docks.
/// So, a dock can move to any other dockZone that does not have a control. Those are the allowed zones.
/// Its own spot is allowed so that the highlighting looks correct -- but it is not necessary.
/// </summary>
public
void
SynchForbiddenZones()
{
IEnumerable<CormantRadDockZone> dockZonesWithDocks = LayoutManager.Instance.RegisteredDockZones.Where(dockZone => dockZone.Docks.Any());
ForbiddenZones = dockZonesWithDocks.Select(dockZone => dockZone.ID).ToArray();
Logger.DebugFormat(
"Forbidden zones for dock: {0} are {1}"
, ID, ForbiddenZones);
}
public
void
SyncAndUpdate()
{
SynchForbiddenZones();
GetWrappingUpdatePanel().Update();
}