| <%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Pages.aspx.vb" Inherits="Pages" title="Untitled Page" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> |
| |
| <script type="text/javascript"> |
| //<![CDATA[ |
| function confirmCallBackFn(arg) |
| { |
| alert("Confirm returned the following result: " + arg); |
| eventArgs.set_cancel(true); |
| } |
| function promptCallBackFn(arg) |
| { |
| alert ("Prompt returned the following result: " + arg); |
| } |
| function onClientContextMenuItemClicked(sender, args) |
| { |
| if (!confirm("Are you sure you want to delete this item?")) { |
| args.set_cancel(true); |
| } |
| // radconfirm('Are you sure?', confirmCallBackFn); |
| //args.set_cancel(true); |
| //var node = eventArgs.get_node(); |
| //var item = eventArgs.get_menuItem(); |
| // if ((item.get_text() == "Network Search") && (node.get_text() == "Printers")) |
| // { |
| // eventArgs.set_cancel(true); |
| //} |
| } |
| //]]> |
| </script> |
| <table cellpadding="10" cellspacing="0" border="0"> |
| <tr><td valign="top"> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadTreeView1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="panel2" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <asp:Panel ID="panel1" runat=server> |
| <telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Hay" AllowNodeEditing="True" EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" MultipleSelect="false" OnNodeDrop="RadTreeView1_HandleDrop" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" BorderStyle="Dotted" BorderWidth="1" OnClientContextMenuItemClicking="onClientContextMenuItemClicked"> |
| <CollapseAnimation Duration="100" Type="OutQuint" /> |
| <ExpandAnimation Duration="100" /> |
| <ContextMenus> |
| <telerik:RadTreeViewContextMenu Skin="Hay" ID="MainContextMenu" runat="server" > |
| <Items> |
| <telerik:RadMenuItem Value="NewMenuItem" Text="New Menu Item" ImageUrl="~/images/AddRecord.gif"></telerik:RadMenuItem> |
| <telerik:RadMenuItem Value="DeleteMenuItem" Text="Delete Menu Item" ImageUrl="~/images/Delete.gif"></telerik:RadMenuItem> |
| </Items> |
| </telerik:RadTreeViewContextMenu> |
| </ContextMenus> |
| </telerik:RadTreeView> |
| </asp:Panel> |
| </td><td> |
| <asp:Panel ID="panel2" runat=server> |
| <asp:Label ID="mylabel" text="no value" runat=server></asp:Label> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" |
| Width="75px"> |
| <img alt="Loading..." src="images/loading6.gif" style="border-right: 0px; border-top: 0px; |
| border-left: 0px; border-bottom: 0px" /> |
| </telerik:RadAjaxLoadingPanel> |
| |
| <telerik:RadTabStrip ID="RadTabStrip2" runat="server" MultiPageID="RadMultiPage1" Skin="Hay" SelectedIndex="0"> |
| <Tabs> |
| <telerik:RadTab runat="server" Text="Page Editor" Selected="True"> |
| </telerik:RadTab> |
| <telerik:RadTab runat="server" Text="Menu Properties"> |
| </telerik:RadTab> |
| </Tabs> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"> |
| <telerik:RadPageView ID="RadPageView1" runat="server" Width="300"> |
| <telerik:RadEditor ID="RadEditor1" runat="server" Skin="Hay"> |
| <Content> |
| </Content> |
| </telerik:RadEditor> |
| </telerik:RadPageView> |
| <telerik:RadPageView ID="RadPageView2" runat="server" Width="300"> |
| <table width="680" border="0"> |
| <tr><td> </td></tr> |
| </table> |
| <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Web20" /> |
| <asp:Label ID="Label2" runat="server" Text="Visible:"></asp:Label><asp:RadioButton ID="RadioButton3" runat="server" Text="Yes" GroupName="visible" Checked="true" /><asp:RadioButton ID="RadioButton4" runat="server" Text="No" GroupName="newwindow" /> |
| <table cellpadding="5" cellspacing="0" border="0" class="dottedBorder"> |
| <tr> |
| <td colspan="2" align=center><strong>Linking Options</strong></td> |
| </tr> |
| <tr> |
| <td> |
| <asp:RadioButton ID="linktype1" runat="server" Text="No Link" GroupName="linktype" /> |
| </td> |
| <td> |
| |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:RadioButton ID="linktype2" runat="server" Text="Page Link" GroupName="linktype" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="Hay"> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:RadioButton ID="linktype3" runat="server" Text="Page Link" GroupName="linktype" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="RadComboBox2" runat="server" Skin="Hay"> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <asp:RadioButton ID="linktype4" runat="server" Text="External Link" GroupName="linktype" /> |
| </td> |
| <td> |
| <telerik:RadTextBox ID="RadTextBox1" runat="server" Text="http://" Skin="Hay"> |
| </telerik:RadTextBox> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> |
| <asp:Label ID="Label1" runat="server" Text="Open in new window:"></asp:Label><asp:RadioButton ID="RadioButton1" runat="server" Text="Yes" GroupName="newwindow" /><asp:RadioButton ID="RadioButton2" runat="server" Text="No" GroupName="newwindow" Checked=true /> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" align=center><asp:Button ID="Button1" runat="server" Text="Submit" /></td> |
| </tr> |
| </table> |
| </telerik:RadPageView> |
| </telerik:RadMultiPage> |
| |
| </asp:Panel> |
| </td></tr></table> |
| |
| </asp:Content> |
ResourceType
resourceType = new ResourceType("User");
resourceType.TextField = "usrEmail";
resourceType.KeyField = "ID";
resourceType.ForeignKeyField = "usrID";
resourceType.DataSource = dtRecurrence;
RadScheduler1.ResourceTypes.Add(resourceType);
RadScheduler1.DataBind();
Now when i tried to output the values of the user, I got an error
foreach
(Appointment recurringapt in RadScheduler1.Appointments)
{
Response.Write("Resource Text is : " + recurringapt.Resources[0].Text);
Response.Write("Resource Text is : " + recurringapt.Resources[0].Key);
}
So I did a count on the Resources and it gave me a count of 0. So my question to you is: I'm doing something wrong here. If so do let me know the correct code to go about this
Using the ASP.NET grid, I had a page that persisted client-side selection, using this example:
http://www.telerik.com/community/code-library/submission/b311D-khchg.aspx
After upgrading to the AJAX control, this page now errors, due to Javascript choking on:
function
GridCreated(){
grid = this;
var pageIndex = grid.CurrentPageIndex.toString();
...specifically, "grid.currentPageIndex is null or not an object".
Suggestions?
Bill
I have a radtreeview inside radcombobox. My treeview is populated on demand. This combobox resides inside formview which is by default in edit mode. And i have an objectdatsource that contains the select and update mode.
The problem with my update mode is, the selected value of combox always becomes 0 it doesn't change even when using combo.set_value("something");
In client side the value changes but not in server side even when trackChanges() and commitChanges() is applied.
The following link contains the type of solution but its not working, with my q1 2008 415 version. it has a special parameter called <telerik:AjaxComboValueParameter />. Wouldn't it be better if that parameter would be provided by Telerik instead of trying to code it.
http://www.telerik.com/community/code-library/submission/b311D-ttdgm.aspx
Following is my javascript file for setting the value of the combobox when selecting a treenode. My objectdatasource update parameter contains <asp:ControlParameter Name="parentId" Type="Int32" ControlID="cbo" PropertyName="SelectedValue" />. The name of my radcombox inside formview edit mode is cbo and treeview is radPortalsTree.
function radTreeViewPortalParent_OnClientNodeClicking(sender,eventArgs)
{
var comboBox=$find('<%=FormViewPortal.FindControl("cbo").ClientID%>');
var node=eventArgs.get_node();
var portalTree=$find('<%= radPortalsTree.ClientID %>');
if(portalTree.get_selectedNode().get_value()!=node.get_value())
{
comboBox.trackChanges();
comboBox.set_text(node.get_text());
comboBox.set_value(node.get_value());
var cboItem=comboBox.get_items().getItem(0);
cboItem.set_value(node.get_value());
comboBox.commitChanges();
}
comboBox.hideDropDown();
}