| <telerik:RadSlider ID="sliderDisk" runat="server" ShowDecreaseHandle="False" ShowDragHandle="False" |
| TrackPosition="TopLeft" Height="40px" Width="200px" ShowIncreaseHandle="False" |
| Skin="Black" Value="30" ItemType="Tick" LargeChange="20" ForeColor="#252525" |
| SmallChange="20" > |
| </telerik:RadSlider> |

Hello All,
I have a small problem with own Business classes because there should be a method how to update Server side variables from Client side.
Situation is followig: Application opens modal Popup RadWindow and user can make queries to database in that window.
User can also select rows she wants and selected rows are put into their own RadGrid. When user closes her Popup Window rows containing user selected rows should be passed as Business Objects into Popup Window's Parent Window.
I heard somewhere that it's possible to make an Ajax Extender of own Business class so that when it's value changes it changes in both client and server side. Is this possible and if it is how to do it?
I have Googled a lot's of articles considering this issue but haven't get a picture how to actually do it.
Articles also contains specific information about Ajax Control Toolkit environment so, when I'm using Telerik's Asp.Net Ajax Components it's difficult to port Toolkit's classes and their methods into Telerik's.
So can anyone help me?
I work as a developer in a company which has licenses to Telerik products.
Thanks,
Michael
var
splitter = window["<%= RadSplitter2.ClientID %>"];
var
pane = splitter.GetPaneById("ContentPane");
pane.SetContentUrl(url);
var url = eventArgs.Item.NavigateUrl;
I've tried wrapping it in RadCodeBlock because of the server var as well....No Go.
This script error this leads to another error, in my pageload event i call a function which checks a server var for whether the user has validly logged in else it pops up a RadWindow Login.
This now will only fire if I Ctl-F5 - refresh the page, but not on initial load.
I tried substituting the above script with, the one as used in your demo for this,
i.e.
var
splitter = $find("RadSplitter2");
but the event will not fire anyway,..s0 whether i put the Script in the head, the top of the body , the bottom of it, whather I try wrapping the whole body content in a rad ajax pane,..nothing.
and if I click on the menu item,...the page I want in my content pane, loads in a new window!
Oh and of course the Radpane, panel bar, resize themselves to a few millimetres in width after the menu items are loaded from Db,..once actually logged in.
I am Currently using V 2009.1
Code behind is minor, just databinding and
protected void RadMenu1_OnItemDataBound(object sender, RadMenuEventArgs e)
{
RadMenuItem ei = e.Item as RadMenuItem;
ei.Target =
"ContentPane";
}
And ..of course I have deadlines for my clients and fees being Tuesday. "Sweating!!"
the markup is included beneath:
Many Thanks
Neal
<%
@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<
html>
<head id="Head1" runat="server">
<link rel="stylesheet" type="text/css" href="~/RootStyle.css"/>
</head>
<body topmargin=10 leftmargin=0 onload="CheckCloseRefresh()" scroll="yes">
<form id="form1" runat="server" method="post" >
<asp:scriptmanager ID="Scriptmanager2" runat="server"></asp:scriptmanager>
<script language="javascript" type="text/javascript">
function CheckCloseRefresh()
{
var ShowLogin = <%= Show %>;
if (ShowLogin == true)
{
Login();
}
}
function Login()
{
var urlExtn = "ms=" + new Date().getTime();
var oWnd = radopen("Forms/Auth/Login.aspx?" + urlExtn , "Login");
}
function Menu_OnClientItemClicked(sender, eventArgs)
{
alert(
"menu clicked");
var splitter = $find("RadSplitter2");
var pane = splitter.GetPaneById("ContentPane");
pane.SetContentUrl(url);
var url = eventArgs.Item.NavigateUrl;
}
</script>
<telerik:RadWindowManager
ID="RadWindowManager1"
runat="server"
>
<Windows>
<telerik:RadWindow
ID="Login"
runat="server"
Width="600px"
Height="245px"
Modal="true"
Top="250"
Left="400"
BackColor="lightgray"
>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<!-- Div obox(GradientBackGround) -->
<div id="oBox"
class="oBox"
>
<!-- Div Top Center Text -->
<div id="DivTopText"
align="center"
class="DivTopText"
style="font-family:Lucida Calligraphy; font-size:large; color:Gold" >
Equine & Wildlife Insurance
</div>
</div>
<div id="UserInfo" align="right" style="width:100%; left:0;">
</div>
<div id="Main" style="position:absolute; top:70px; left:0px; width:100%; ">
<asp:Label ID="lblInfo" runat="server" Enabled="false"
text="Press the 'F11' key on your keyboard to run in Fullscreen"></asp:Label>
<telerik:radsplitter id="RadSplitter1" runat="server"
Height ="900px" width="100%"
Skin="Telerik"
liveresize="true"
orientation="Vertical"
BorderColor="Transparent"
BorderSize="1"
BorderStyle="None" BackColor="Transparent">
<telerik:radpane
Height="97%"
id="navigationPane" runat="server"
MaxWidth="300"
MinHeight="500"
MinWidth="75" Width="15%"
BackColor="DimGray">
<telerik:RadPanelbar ID="RadPanelbar1" runat="server"
Width="100%" PersistStateInCookie="True" >
<Items>
<telerik:RadPanelItem Text="Admin" Height="50%" Width="100%"
Expanded="True" runat="server" CssClass="FrmHdrMnuGrdnt">
<Items >
<telerik:RadPanelItem runat="server" Selected="True"
CssClass="FrmHdrMnuGrdnt" Width="100%">
<ItemTemplate >
<telerik:RadMenu ID="RadMenu1"
runat="server"
Flow="Vertical" Width="100%" Height="100%"
skin="Equistar"
EnableEmbeddedSkins="false"
DataFieldID="ScreenId"
DataFieldParentID="ParentScreenId"
DataNavigateUrlField="Screen"
DataTextField="Title"
DataValueField="ScreenId"
OnItemDataBound="RadMenu1_OnItemDataBound"
OnClientItemClicking="Menu_OnClientItemClicked"
>
</telerik:RadMenu>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
<telerik:RadPanelItem Text="Brokers" Expanded="True"
Height="50%" runat="server" CssClass="FrmHdrMnuGrdnt">
<Items>
<telerik:RadPanelItem runat="server">
<ItemTemplate>
<telerik:RadMenu ID="Radmenu2" runat="server"
Flow="Vertical" Width="99%" Height="99%"
skin="Equistar"
EnableEmbeddedSkins="false"
DataFieldID="ScreenId"
DataFieldParentID="ParentScreenId"
DataNavigateUrlField="Screen"
DataTextField="Title"
DataValueField="ScreenId"
OnItemDataBound="RadMenu2_OnItemDataBound"
OnClientItemClicking="Menu_OnClientItemClicked">
</telerik:RadMenu>
</ItemTemplate>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelItem>
</Items>
</telerik:RadPanelbar>
</telerik:RadPane>
<telerik:radsplitbar id="RadSplitbar1" runat="server"
CollapseMode="Both"
EnableResize="True"
EnableTheming="False"
ResizeStep="1"
BorderColor="BlanchedAlmond"
BorderStyle="solid"
BorderWidth="1px"
Width="10px">
</telerik:radsplitbar>
<telerik:radpane id="RadPane2" runat="server"
BackColor="White"
height="97%"
Width="100%"
> <!--
Nester Horizontal splitter
-->
<telerik:radsplitter id="RadSplitter2" runat="server"
liveresize="true"
orientation="Horizontal"
Skin="Telerik" Height="99%" Width="100%">
<telerik:radpane id="ContentPane"
runat="server"
height="99%"
width="99%"
MinHeight="250"
ContentUrl="EquistarMain.aspx"
MinWidth="500"
>
</telerik:radpane>
</telerik:radsplitter>
</telerik:radpane>
</telerik:radsplitter>
</div>
</form>
</body>
</
html>
Hi,
I am trying to set the default value on 3 GridDropDownColumn's in an auto generated edit form. I have the following code in the grids item event (based on sample code). The problem is while this works correctly for text based fields the drop down lists are not set.
| protected void rgAppointments_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| if (e.CommandName == RadGrid.InitInsertCommandName) //"Add new" button clicked |
| { |
| if (ViewState["LAST_APPOINTMENT"] != null) |
| { |
| AppointmentSave lstApp = (AppointmentSave)ViewState["LAST_APPOINTMENT"]; |
| e.Canceled = true; |
| //Prepare an IDictionary with the predefined values |
| System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary(); |
| newValues["staff_member_id"] = lstApp.StaffMember; |
| newValues["appointment_type_id"] = lstApp.AppointmentType; |
| newValues["location_id"] = lstApp.Location; |
| //Insert the item and rebind |
| e.Item.OwnerTableView.InsertItem(newValues); |
| } |
| } |
| } |
The version of the controls I am using is 2008.3.1125.20.
How do I get this to work or am I going to have to switch to a template to do this?
Thanks
Gavin