<
telerik:RadFilter
ID
=
"RadFilter1"
runat
=
"server"
Skin
=
"WebBlue"
>
<
FieldEditors
>
<
telerik:RadFilterTextFieldEditor
DataType
=
"System.String"
DisplayName
=
"Customer account"
FieldName
=
"CodeClient"
/>
</
FieldEditors
>
</
telerik:RadFilter
>
Private
Sub
RadFilter1_FieldEditorCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.RadFilterFieldEditorCreatedEventArgs)
Handles
RadFilter1.FieldEditorCreated
If
sculture =
"fr-FR"
Then
If
e.Editor.FieldName =
"CodeClient"
Then
e.Editor.DisplayName =
"Code Client"
End
If
End
If
End
Sub
<
telerik:RadGrid
ID
=
"rdgrdPeople"
DataSourceID
=
"people"
PageSize
=
"10"
AllowPaging
=
"true"
AllowAutomaticDeletes
=
"true"
AllowMultiRowSelection
=
"true"
Skin
=
"Windows7"
OnItemDataBound
=
"rdgrdPeople_ItemDataBound"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"false"
runat
=
"server"
>
<
GroupingSettings
CaseSensitive
=
"False"
/>
<
MasterTableView
AutoGenerateColumns
=
"false"
DataKeyNames
=
"Id"
OverrideDataSourceControlSorting
=
"true"
>
<
Columns
>
<
telerik:GridHyperLinkColumn
Text
=
"View"
UniqueName
=
"View"
AllowFiltering
=
"false"
DataNavigateUrlFields
=
"Id,Profile"
DataNavigateUrlFormatString
=
"managecontact.aspx?id={0}&profile={1}"
/>
<
telerik:GridHyperLinkColumn
Text
=
"Edit"
UniqueName
=
"Edit"
AllowFiltering
=
"false"
DataNavigateUrlFields
=
"Id,Profile"
DataNavigateUrlFormatString
=
"managecontact.aspx?id={0}&profile={1}"
/>
<
telerik:GridButtonColumn
ButtonType
=
"LinkButton"
UniqueName
=
"Delete"
CommandName
=
"Delete"
Text
=
"Delete"
ConfirmText
=
"Are you sure you want to delete this person?"
/>
<
telerik:GridTemplateColumn
AllowFiltering
=
"false"
SortExpression
=
"Marked"
HeaderText
=
"Marked"
UniqueName
=
"Marked"
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"chkbxMarked"
runat
=
"server"
OnCheckedChanged
=
"ToggleRowSelection"
Checked='<%# Eval("Marked") %>'
AutoPostBack="True" />
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"NamePrefix"
SortExpression
=
"NamePrefix"
AllowFiltering
=
"false"
HeaderText
=
"Name Prefix"
/>
<
telerik:GridBoundColumn
DataField
=
"LastName"
SortExpression
=
"LastName"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
HeaderText
=
"Last Name"
/>
<
telerik:GridBoundColumn
DataField
=
"FirstName"
SortExpression
=
"FirstName"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
HeaderText
=
"First Name"
/>
<
telerik:GridBoundColumn
DataField
=
"MiddleName"
SortExpression
=
"MiddleName"
AllowFiltering
=
"false"
HeaderText
=
"Middle Name"
/>
<
telerik:GridBoundColumn
DataField
=
"Phone1"
SortExpression
=
"Phone1"
AllowFiltering
=
"false"
HeaderText
=
"Phone"
/>
<
telerik:GridBoundColumn
DataField
=
"Phone1Ext"
SortExpression
=
"Phone1Ext"
AllowFiltering
=
"false"
HeaderText
=
"Ext."
/>
<
telerik:GridBoundColumn
DataField
=
"Email1"
SortExpression
=
"Email1"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
HeaderText
=
"Email"
/>
<
telerik:GridBoundColumn
DataField
=
"Profile"
SortExpression
=
"Profile"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"Contains"
HeaderText
=
"Profile"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:ObjectDataSource
ID
=
"people"
runat
=
"server"
EnablePaging
=
"true"
SelectMethod
=
"FindAllByProfile"
DeleteMethod
=
"Delete"
TypeName
=
"PRA.Business.PersonLogic"
StartRowIndexParameterName
=
"rowStart"
MaximumRowsParameterName
=
"numRows"
SelectCountMethod
=
"FindAllByProfileCount"
>
<
SelectParameters
>
<
asp:ControlParameter
ControlID
=
"drplstProfiles"
PropertyName
=
"SelectedItem.Value"
Name
=
"profileName"
/>
</
SelectParameters
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"Id"
/>
</
DeleteParameters
>
</
asp:ObjectDataSource
>
public
IList<Person> FindAllByProfile(
string
profileName,
int
rowStart,
int
numRows)
{
return
profileName ==
"All"
? _repos.FindAll(rowStart, numRows) : _repos.FindAllByProfile(profileName, rowStart, numRows);
}
public
int
FindAllByProfileCount(
string
profileName)
{
return
profileName ==
"All"
? _repos.FindAllCount() : _repos.FindAllByProfileCount(profileName);
}
public
IList<Person> FindAll(
int
rowStart,
int
numRows)
{
using
(PRADbDataContext db =
new
PRADbDataContext())
{
var data = from p
in
db.persons
join c
in
db.contacts on p.PersKey equals c.PersKey into personContacts
from pc
in
personContacts.DefaultIfEmpty()
orderby p.Modified descending
select
new
Person()
{
Id = p.PersKey,
AddressId = p.AddrKey,
DateModified = p.Modified,
Email1 = p.EMail1,
Marked = p.Marked,
Phone1 = p.Phone1,
Phone1Ext = p.PhExt1,
NamePrefix = p.MrMs,
FirstName = p.FName,
LastName = p.LName,
MiddleName = p.MName,
Title = p.Title,
Profile = pc.ProfKey ??
"N/A"
};
return
data.Skip(rowStart).Take(numRows).ToList();
}
}
public
int
FindAllCount()
{
using
(PRADbDataContext db =
new
PRADbDataContext())
{
var data = from p
in
db.persons
join c
in
db.contacts on p.PersKey equals c.PersKey
select
new
Person()
{
Id = p.PersKey,
};
return
data.Count();
}
}
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; MS-RTC EA 2)
Timestamp: Wed, 15 Jun 2011 20:12:16 UTC
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'tance of an object.|Â'.
Line: 6
Char: 62099
Code: 0
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'tance of an object.|Â'.
Line: 6
Char: 62099
Code: 0
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'tance of an object.|Â'.
Line: 6
Char: 62099
Code: 0
When i move more docks, after the 3rd dock i get an error 500.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Web.UI;
using
System.Data.SqlClient;
using
System.Text;
using
System.Collections;
using
System.Configuration;
public
partial
class
mods_arrange : System.Web.UI.UserControl
{
private
int
_userID = 1;
private
SqlConnection _conn =
new
SqlConnection(ConfigurationManager.ConnectionStrings[
"ConnectionString"
].ConnectionString);
private
List<DockState> CurrentDockStates
{
get
{
//Get saved state string from the database - set it to dockState variable for example
string
dockStatesFromDB =
""
;
if
(Request.Cookies[
"landingStates_V"
] !=
null
)
{
dockStatesFromDB = Request.Cookies[
"landingStates_V"
].Value;
}
else
{
_conn.Open();
SqlCommand command =
new
SqlCommand(
"select State from landing_States where id='"
+ _userID +
"' "
, _conn);
dockStatesFromDB = command.ExecuteScalar().ToString();
_conn.Close();
}
List<DockState> _currentDockStates =
new
List<DockState>();
string
[] stringStates = dockStatesFromDB.Split(
'|'
);
foreach
(
string
stringState
in
stringStates)
{
if
(stringState.Trim() !=
string
.Empty)
{
_currentDockStates.Add(DockState.Deserialize(stringState));
}
}
return
_currentDockStates;
}
}
protected
void
Page_Load(
object
sender, EventArgs e)
{
//RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
//manager.ClientEvents.OnRequestStart = "RequestStart";
//manager.ClientEvents.OnResponseEnd = "ResponseEnd";
if
(!IsPostBack)
{
DropDownZone.DataBind();
}
}
public
ArrayList GetZones()
{
ArrayList zones =
new
ArrayList();
zones.Add(RadDockZone1);
zones.Add(RadDockZone2);
zones.Add(RadDockZone3);
return
zones;
}
protected
void
Page_Init(
object
sender, EventArgs e)
{
//Recreate the docks in order to ensure their proper operation
for
(
int
i = 0; i < CurrentDockStates.Count; i++)
{
if
(CurrentDockStates[i].Closed ==
false
)
{
RadDock dock = CreateRadDockFromState(CurrentDockStates[i]);
//We will just add the RadDock control to the RadDockLayout.
// You could use any other control for that purpose, just ensure
// that it is inside the RadDockLayout control.
// The RadDockLayout control will automatically move the RadDock
// controls to their corresponding zone in the LoadDockLayout
// event (see below).
RadDockLayout1.Controls.Add(dock);
//We want to save the dock state every time a dock is moved.
CreateSaveStateTrigger(dock);
//Load the selected widget
LoadWidget(dock);
}
}
loadCheckboxes();
}
private
void
loadCheckboxes()
{
ListItem i1 =
new
ListItem(
"News"
,
"~/Controls/News.ascx"
);
ListItem i2 =
new
ListItem(
"Events"
,
"~/Controls/Events.ascx"
);
ListItem i3 =
new
ListItem(
"Languages"
,
"~/Controls/Languages.ascx"
);
ListItem i4 =
new
ListItem(
"Market"
,
"~/Controls/MarketIndex.ascx"
);
ListItem i5 =
new
ListItem(
"VC"
,
"~/Controls/VC.ascx"
);
ListItem i6 =
new
ListItem(
"DVD"
,
"~/Controls/DVD.ascx"
);
ListItem i7 =
new
ListItem(
"PIF"
,
"~/Controls/PIF.ascx"
);
CheckBoxList1.Items.Add(i1);
CheckBoxList1.Items.Add(i2);
CheckBoxList1.Items.Add(i3);
CheckBoxList1.Items.Add(i4);
CheckBoxList1.Items.Add(i5);
CheckBoxList1.Items.Add(i6);
CheckBoxList1.Items.Add(i6);
LcookieCheck();
}
protected
void
RadDockLayout1_LoadDockLayout(
object
sender, DockLayoutEventArgs e)
{
//Populate the event args with the state information. The RadDockLayout control
// will automatically move the docks according that information.
//if (!IsPostBack)
//{
// foreach (DockState state in CurrentDockStates)
// {
// e.Positions[state.UniqueName] = state.DockZoneID;
// e.Indices[state.UniqueName] = state.Index;
// }
//}
if
(!Page.IsPostBack)
{
string
dockStatesFromCookie =
""
;
HttpCookie cookieStates = Request.Cookies[
"dockState"
];
if
(cookieStates !=
null
)
{
dockStatesFromCookie = cookieStates.Value;
string
[] stringStates = dockStatesFromCookie.Split(
'|'
);
Hashtable states =
new
Hashtable();
for
(
int
i = 0; i < stringStates.Length - 1; i++)
{
string
[] currentState = stringStates[i].Split(
'#'
);
string
uniqueName = currentState[0];
string
state = currentState[1];
states.Add(uniqueName, state);
}
foreach
(RadDock dock
in
RadDockLayout1.RegisteredDocks)
{
string
uniqueName = dock.UniqueName;
DockState state = DockState.Deserialize(states[uniqueName].ToString());
dock.ApplyState(state);
}
}
}
}
protected
void
RadDockLayout1_SaveDockLayout(
object
sender, DockLayoutEventArgs e)
{
List<DockState> stateList = RadDockLayout1.GetRegisteredDocksState();
StringBuilder serializedList =
new
StringBuilder();
int
i = 0;
while
(i < stateList.Count)
{
serializedList.Append(stateList[i].ToString());
serializedList.Append(
"|"
);
i++;
}
string
dockState = serializedList.ToString();
if
(dockState.Trim() != String.Empty)
{
if
(Request.Cookies[
"landingStates_V"
] !=
null
)
{
Response.Cookies[
"landingStates_V"
].Value = dockState;
}
else
{
Response.Cookies[
"landingStates_V"
].Value = dockState;
Response.Cookies[
"landingStates_V"
].Expires = DateTime.Now.AddDays(5);
}
_conn.Open();
//SqlCommand command = new SqlCommand(String.Format("update landing_States set State='{0}' where id='" + _userID + "'", dockState), _conn);
//command.ExecuteNonQuery(); //update Dbase
_conn.Close();
}
}
private
RadDock CreateRadDockFromState(DockState state)
{
RadDock dock =
new
RadDock();
dock.DockMode = DockMode.Docked;
dock.ID =
string
.Format(
"RadDock{0}"
, state.UniqueName);
dock.ApplyState(state);
//by aresh
dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
dock.DockMode = DockMode.Docked;
dock.CssClass =
"vbox"
+ state.Title.Replace(
' '
,
'a'
);
DockToggleCommand cmd =
new
DockToggleCommand();
cmd.OnClientCommand =
"OnClientCommand"
+ state.Title.Replace(
' '
,
'a'
);
cmd.Text =
"Edit"
;
cmd.CssClass =
"rdEdit"
;
cmd.AutoPostBack =
false
;
DockCloseCommand cmdclose =
new
DockCloseCommand();
cmdclose.AutoPostBack =
false
;
//true;
DockExpandCollapseCommand cmdminmax =
new
DockExpandCollapseCommand();
cmdminmax.AutoPostBack =
false
;
dock.Commands.Add(cmdclose);
dock.Commands.Add(cmdminmax);
//dock.Commands.Add(cmd);
return
dock;
}
private
RadDock CreateRadDock(String name)
{
int
docksCount = CurrentDockStates.Count;
RadDock dock =
new
RadDock();
dock.DockMode = DockMode.Docked;
dock.UniqueName = Guid.NewGuid().ToString().Replace(
' '
,
'a'
);
dock.ID =
string
.Format(
"RadDock{0}"
, dock.UniqueName);
dock.Title = name.Replace(
'_'
,
' '
);
dock.Width = Unit.Pixel(300);
//by aresh
dock.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None;
dock.DockMode = DockMode.Docked;
dock.CssClass =
"vbox"
+ name.Replace(
' '
,
'a'
);
DockToggleCommand cmd =
new
DockToggleCommand();
cmd.OnClientCommand =
"OnClientCommand"
+ name.Replace(
' '
,
'a'
); ;
cmd.Text =
"Edit"
;
cmd.CssClass =
"rdEdit"
;
cmd.AutoPostBack =
false
;
DockCloseCommand cmdclose =
new
DockCloseCommand();
cmdclose.AutoPostBack =
false
;
//true;
DockExpandCollapseCommand cmdminmax =
new
DockExpandCollapseCommand();
cmdminmax.AutoPostBack =
false
;
dock.Commands.Add(cmdclose);
dock.Commands.Add(cmdminmax);
//dock.Commands.Add(cmd);
return
dock;
}
private
void
CreateSaveStateTrigger(RadDock dock)
{
//Ensure that the RadDock control will initiate postback
// when its position changes on the client or any of the commands is clicked.
//Using the trigger we will "ajaxify" that postback.
dock.AutoPostBack =
true
;
dock.CommandsAutoPostBack =
false
;
AjaxUpdatedControl updatedControl =
new
AjaxUpdatedControl();
updatedControl.ControlID =
"Panel1"
;
AjaxSetting setting1 =
new
AjaxSetting(dock.ID);
setting1.EventName =
"DockPositionChanged"
;
setting1.UpdatedControls.Add(updatedControl);
RadAjaxManagerArrange.AjaxSettings.Add(setting1);
}
private
void
LoadWidget(RadDock dock)
{
if
(
string
.IsNullOrEmpty(dock.Tag))
{
return
;
}
Control widget = LoadControl(dock.Tag);
dock.ContentContainer.Controls.Add(widget);
}
protected
void
ButtonAddDock_Click(
object
sender, EventArgs e)
{
//Load the selected widget in the RadDock control
foreach
(ListItem con
in
CheckBoxList1.Items)
{
if
(con.Selected ==
true
)
{
WcookieCheck(con.Value, con.Text);
RadDock dock = CreateRadDock(con.Text);
//find the target zone and add the new dock there
RadDockZone dz = (RadDockZone)FindControl(DropDownZone.SelectedItem.Text);
dz.Controls.Add(dock);
CreateSaveStateTrigger(dock);
dock.Tag = con.Value;
LoadWidget(dock);
//Register a script to move dock to the last place in the RadDockZone
//The zone.dock(dock,index) client-side method is used
ScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"MoveDock"
,
string
.Format(@"function _moveDock() {{
Sys.Application.remove_load(_moveDock);
$find(
'{1}'
).dock($find(
'{0}'
),{2});
}};
Sys.Application.add_load(_moveDock);", dock.ClientID, DropDownZone.SelectedValue, dz.Docks.Count),
true
);
}
}Response.Redirect(
"/default.aspx"
);
}
protected
void
ButtonPostBack_Click(
object
sender, EventArgs e)
{
if
(Request.Cookies[
"landingChecks_V"
] !=
null
)
{
HttpCookie myCookie =
new
HttpCookie(
"landingChecks_V"
);
myCookie.Expires = DateTime.Now.AddDays(-1d);
Response.Cookies.Add(myCookie);
}
Response.Redirect(
"default.aspx"
);
}
private
void
WcookieCheck(
string
val,
string
txt)
{
HttpCookie cookie = Request.Cookies[
"landingChecks_V"
];
if
(cookie !=
null
)
{
cookie.Expires = DateTime.Now.AddYears(-30);
Response.Cookies.Remove(
"landingChecks_V"
);
HttpCookie Newcookie =
new
HttpCookie(
"landingChecks_V"
);
Newcookie.Expires = DateTime.Now.AddDays(5);
Newcookie.Values.Add(val, txt);
Response.Cookies.Add(Newcookie);
cookie.Values.Add(val, txt);
Response.Cookies.Add(cookie);
}
else
{
HttpCookie Newcookie =
new
HttpCookie(
"landingChecks_V"
);
Newcookie.Expires = DateTime.Now.AddDays(5);
Newcookie.Values.Add(val, txt);
Response.Cookies.Add(Newcookie);
}
}
private
void
LcookieCheck()
{
HttpCookie cookie = Request.Cookies[
"landingChecks_V"
];
if
(cookie !=
null
&& cookie.Values !=
null
)
{
foreach
(
string
key
in
cookie.Values.Keys)
{
ListItem item = CheckBoxList1.Items.FindByValue(key);
if
(item !=
null
)
{
item.Selected =
true
;
}
}
}
else
{
CheckBoxList1.Items[0].Selected =
true
;
CheckBoxList1.Items[1].Selected =
true
;
CheckBoxList1.Items[2].Selected =
true
;
CheckBoxList1.Items[3].Selected =
true
;
CheckBoxList1.Items[4].Selected =
true
;
CheckBoxList1.Items[5].Selected =
true
;
CheckBoxList1.Items[6].Selected =
true
;
}
}
}
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="arrange.ascx.cs" Inherits="mods_arrange" %>
<
div
class
=
"content-in"
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function RequestStart(sender, args) {
currentLoadingPanel = $find("<%= LoadingPanel1.ClientID %>");
currentUpdatedControl = "TableLayout";
currentLoadingPanel.show(currentUpdatedControl);
}
function ResponseEnd() {
//hide the loading panel and clean up the global variables
if (currentLoadingPanel != null)
currentLoadingPanel.hide(currentUpdatedControl);
currentUpdatedControl = null;
currentLoadingPanel = null;
}
</
script
>
</
telerik:RadCodeBlock
>
<
br
/>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
>
<
telerik:RadDockLayout
runat
=
"server"
ID
=
"RadDockLayout1"
OnSaveDockLayout
=
"RadDockLayout1_SaveDockLayout"
OnLoadDockLayout
=
"RadDockLayout1_LoadDockLayout"
EnableEmbeddedSkins
=
"false"
Skin
=
"myx"
EnableViewState
=
"false"
>
<
table
id
=
"TableLayout"
border
=
"0"
cellspacing
=
"0"
cellpadding
=
"0"
>
<
tr
>
<
td
>
<
div
class
=
"left"
>
<
telerik:RadDockZone
runat
=
"server"
ID
=
"RadDockZone1"
>
</
telerik:RadDockZone
>
</
div
>
<
div
class
=
"center"
>
<
telerik:RadDockZone
runat
=
"server"
ID
=
"RadDockZone2"
>
</
telerik:RadDockZone
>
</
div
>
<
div
class
=
"right"
>
<
telerik:RadDockZone
runat
=
"server"
ID
=
"RadDockZone3"
>
</
telerik:RadDockZone
>
</
div
>
</
td
>
</
tr
>
</
table
>
</
telerik:RadDockLayout
>
</
asp:Panel
>
<
asp:Panel
ID
=
"Panel2"
runat
=
"server"
CssClass
=
"customizePanel"
>
<
a
name
=
"customizepage"
></
a
>
<
div
class
=
"movable"
>
<
div
class
=
"draggable"
><
h2
>Customize</
h2
></
div
>
<
div
class
=
"block"
>
<
div
>
<
p
>
<%= vboxTitles.getTitle("Add and remove your preferred topics", Request.QueryString["language"])%>
</
p
>
<
asp:CheckBoxList
ID
=
"CheckBoxList1"
runat
=
"server"
Enabled
=
"false"
RepeatLayout
=
"UnorderedList"
>
</
asp:CheckBoxList
>
<
asp:DropDownList
ID
=
"DropDownZone"
runat
=
"server"
DataSource="<%#GetZones() %>"
DataTextField="ID" DataValueField="ClientID" Width="150" Visible="false" >
</
asp:DropDownList
>
<
br
/>
<
br
/>
<
telerik:RadButton
ID
=
"ButtonAddDock"
runat
=
"server"
OnClick
=
"ButtonAddDock_Click"
Text
=
"Save"
>
<
Icon
PrimaryIconCssClass
=
"rbOk"
PrimaryIconLeft
=
"4"
PrimaryIconTop
=
"4"
/>
</
telerik:RadButton
>
<
asp:Button
runat
=
"server"
CssClass
=
"button"
ID
=
"ButtonPostBack"
Text
=
"Reset"
OnClick
=
"ButtonPostBack_Click"
/>
<
div
class
=
"clear"
></
div
>
</
div
>
</
div
>
<
div
class
=
"block-bottoml"
>
<
div
class
=
"block-bottomr"
></
div
>
</
div
>
</
div
>
</
asp:Panel
>
<
br
/>
</
div
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManagerArrange"
runat
=
"server"
ClientEvents-OnRequestStart
=
"RequestStart"
ClientEvents-OnResponseEnd
=
"ResponseEnd"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"ButtonAddDocks"
EventName
=
"Click"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"Panel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxLoadingPanel
ID
=
"LoadingPanel1"
runat
=
"server"
MinDisplayTime
=
"500"
Skin
=
"Default"
>
</
telerik:RadAjaxLoadingPanel
>
GridLines="None" AutoGenerateColumns = "False"
OnUpdateCommand = "expDG_RowUpdating" ><MasterTableView commanditemdisplay="Top" EditMode = "EditForms" DataKeyNames = "ex_code">
<Columns>
<tlrk:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn">
<ItemStyle CssClass="MyImageButton"/>
</tlrk:GridEditCommandColumn>
<tlrk:GridBoundColumn DataField="ex_code" HeaderText="Code" UniqueName="ex_code" >
</tlrk:GridBoundColumn>
<tlrk:GridBoundColumn DataField="ex_name" HeaderText="Name" UniqueName="ex_name" >
</tlrk:GridBoundColumn>
<tlrk:GridBoundColumn DataField="DUNS" HeaderText="DUNS" UniqueName="DUNS" >
</tlrk:GridBoundColumn>
<tlrk:GridBoundColumn DataField="email" HeaderText="Email" UniqueName="email" ColumnEditorID = "emailEditor">
</tlrk:GridBoundColumn>
<tlrk:GridButtonColumn ConfirmText="Delete this Exporter?" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
UniqueName="DeleteColumn">
<ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
</tlrk:GridButtonColumn></Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
</EditFormSettings>
</MasterTableView>
</tlrk:RadGrid>
protected
void expDG_RowUpdating(object source,Telerik.Web.UI.GridCommandEventArgs e)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
string expCode = (editedItem["ex_code"].Controls[0] as TextBox).Text;
string expName = (editedItem["ex_name"].Controls[0] as TextBox).Text;
string duns = (editedItem["DUNS"].Controls[0] as TextBox).Text;
string email = (editedItem["email"].Controls[0] as TextBox).Text;
//this is the first approach
Hashtable newValues = new Hashtable();
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
 
//this was the second approach trying to loop through each editor 
GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)editedItem.EditManager.GetColumnEditor("email");
TextBox t = editor.TextBoxControl;
string ee = t.Text;
GridEditableItem editedItem = e.Item as GridEditableItem;
GridEditManager editMan = editedItem.EditManager;
foreach( GridColumn column in e.Item.OwnerTableView.RenderColumns )
{
if ( column is IGridEditableColumn )
{
IGridEditableColumn editableCol = (column as IGridEditableColumn);
if ( editableCol.IsEditable )
{
IGridColumnEditor editor = editMan.GetColumnEditor( editableCol );
string editorType = editor.ToString();
string editorText = "unknown";
object editorValue = null;
if ( editor is GridTextColumnEditor )
{
editorText = (editor as GridTextColumnEditor).Text;
editorValue = (editor as GridTextColumnEditor).Text;
}
}
}
}
I have RadChart with 30 items on X scale. They all have values 0, and I am not showing it (visible=false). I am doing it because I would like to show empty char, but with correct scale (if you don't add any items, there will be red label in center with text about missing data).
So far, so good. But the problem is the chart Y scale goes by default from -50 to +50. And now is my question -- how do you change it, to go from 0, to default (50 is fine)?
I added in ascx file the tags
<PlotArea>
<YAxis2 MinValue=0></YAxis2>
<YAxis MinValue=0></YAxis>
</PlotArea>
It does not work. So I added the equivalent of this in C# code, just after adding data. Still, no change. So how do you set this min value for Y scale?