Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
65 views
I am trying to make a specialday to recurr every other week. How can I accomplish this programatically?

What I have so far is:

        RadCalendarDay day = new RadCalendarDay(); 
        day.Date = Convert.ToDateTime("2008-09-26"); 
        day.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Week; 
        RadCalendar1.SpecialDays.Add(day); 

Missing User
 answered on 29 Sep 2008
0 answers
115 views
Is there a way to have the RadPanelBar do a postback using the OnItemClick event and not have the entire page flicker?

I looked at the demos and they also show this behavior. I can't seem to ajaxify just the RadPanelBar regardless of what I do.

Would manually doing the postback work using the client side click event, like this?

var

ajaxManager = $find("<%= bgAjaxManager.ClientID %>");

ajaxManager.ajaxRequestWithTarget(

'<%= radPanelBar1.UniqueID %>', '');



Thanks.
Scott
Top achievements
Rank 1
 asked on 29 Sep 2008
1 answer
235 views

Situation:-

I have master page which contain radtreeview. The Master Page also contains the content place holder in it which have an iframe, which loads the child pages in it. What i am doing is using the RadAjaxManager for updating the content place holder when user clicks on the treeview & the relevent page is loaded in the iframe.

My problem :-

I want to load page iframe the ajax way, currently it shows the progress bar in browser while loading the page in iframe. Is it possible to have it complete AJAX base (i.e. no postbacks) while loading the page in iframe & updating the data in master page from iframe. we are not binded to specific controls, we can use some other RAD Telerik controls in place of iframe.

Sample Code:-

Master Page

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage1.master.cs" Inherits="TelerikTesting.MasterPage1" %>
<%@ 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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
       <telerik:RadScriptManager ID="rscriptmgrMain" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadSplitter ID="rsplitMain" runat="server" Width="780px" Skin="Office2007"
            LiveResize="True">
            <telerik:RadPane ID="rpaneSelectOptions" runat="server" Width="">
                <telerik:RadSlidingZone ID="rslidezoneMain" runat="server" SlideDirection="Right">
                    <telerik:RadSlidingPane ID="SlidePaneOne" runat="server" Title="SlidePan One">
                        <telerik:RadTreeView ID="RadTreeView1" runat="server" OnNodeClick="RadTreeView1_NodeClick"
                            Skin="Office2007">
                            <Nodes>
                                <telerik:RadTreeNode runat="server" Text="Main">
                                    <Nodes>
                                        <telerik:RadTreeNode runat="server" Text="Google" Value="G" >
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="MSN" Value="M">
                                        </telerik:RadTreeNode>
                                        <telerik:RadTreeNode runat="server" Text="Telerik" Value="T">
                                        </telerik:RadTreeNode>
                                    </Nodes>
                                </telerik:RadTreeNode>
                            </Nodes>
                            <CollapseAnimation Duration="100" Type="OutQuint" />
                            <ExpandAnimation Duration="100" />
                        </telerik:RadTreeView>
                    </telerik:RadSlidingPane>
                    <telerik:RadSlidingPane ID="SlidePaneTwo" runat="server" Title="SlidePan Two">
                        Pane Two</telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
            <telerik:RadPane ID="rpaneContent" runat="server">
                <asp:Panel ID="contentPanel" runat="server">
                    <asp:ContentPlaceHolder ID="rightContentPlaceHolder" runat="server">
                    </asp:ContentPlaceHolder>
                </asp:Panel>
            </telerik:RadPane>
        </telerik:RadSplitter>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="contentPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
            Width="75px">
            <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                style="border: 0px;" />
        </telerik:RadAjaxLoadingPanel>
    </form>
</body>

Master Page CodeBehind:-

protected void RadTreeView1_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            if (e.Node.Value == "G")
            {
                ((System.Web.UI.HtmlControls.HtmlContainerControl)rightContentPlaceHolder.FindControl("iframe1")).Attributes["src"] = "http://www.google.com";
            }
            else if (e.Node.Value == "M")
            {
                ((System.Web.UI.HtmlControls.HtmlContainerControl)rightContentPlaceHolder.FindControl("iframe1")).Attributes["src"] = "http://www.msn.com";
            }
            else if (e.Node.Value == "T")
            {
                ((System.Web.UI.HtmlControls.HtmlContainerControl)rightContentPlaceHolder.FindControl("iframe1")).Attributes["src"] = "http://www.telerik.com";
            }
            else
            {
                ((System.Web.UI.HtmlControls.HtmlContainerControl)rightContentPlaceHolder.FindControl("iframe1")).Attributes["src"] = "about:blank";
            }
        }

Content Page:-

<%@ Page Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikTesting.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="rightContentPlaceHolder" runat="Server">   
    <div style="height:100%;background-color: #f1f1f1;">
   
        <iframe id="iframe1" runat="server" height="100%" width="100%" style="background-color: #f1f1f1;
            border: 0px; border-spacing: 0px; float: left; vertical-align: top;" frameborder="0"
            scrolling="auto"></iframe> 
                    
    </div>
</asp:Content>

looking for your earliest reply.

Thanks,

Maria Ilieva
Telerik team
 answered on 29 Sep 2008
2 answers
83 views
I have a mix of checkboxes and text boxes in a radgrid editform that I would like to manuplate from the client side.

Upon selection of the diffrent checkboxes I want to disable textboxs.

If I am not wrong in the code behind I can do that by accessing this object GridEditFormItem.

Is there a way to do what I need to do through javascript?

Appreciate your help.

Sintayehu
Top achievements
Rank 1
 answered on 29 Sep 2008
2 answers
110 views
I would like to be able to turn UseStaticHeaders on/off client-side in RadGrid for ASP.NET AJAX.  It doesn't seem like that property is available client-side.  It seems to be available in RadGrid for ASP.NET, but not the AJAX version.  Is that property available and I'm just missing it?
Wendy Hayden
Top achievements
Rank 1
 answered on 29 Sep 2008
1 answer
97 views
 
First Thanks for the solution

But  i have the same problem with the RadTextBoxChanged event 
I did the same as maintion for the Dropdownlist but unable to work with the RadTextBoxChange event like not able the RadTextBoxChangedEventArgs e
To get the other controls like
radComboBox for Zip and state field 

protected void City_TextChanged(object sender, EventArgs e)
{

RadTextBox

txtCity = (RadTextBox)e; 

        GridEditableItem editedItem = ddlState.NamingContainer as GridEditableItem; 
        RadComboBox ddlZipeditedItem.FindControl("DropDownListZip") 


}

By this event not able to get the value like this, Showing error
 "Cannot convert type 'System.EventArgs' to 'Telerik.Web.UI.RadTextBox'"



Thanks With regards
Pankaj Tyagi

 

 void ddlSate_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        RadComboBox ddlState = (RadComboBox)o; 
        GridEditableItem editedItem = ddlState.NamingContainer as GridEditableItem; 
        RadComboBox ddlZipeditedItem.FindControl("DropDownListZip") as RadComboBox; 
    } 
 

telerik:RadGrid ID="rgStaffPhysicianDetails" EnableAJAX="False" runat="server" Skin ="WebBlue" width="100%"

 

AutoGenerateDeleteColumn ="True" AutoGenerateEditColumn ="True" GridLines="None" AutoGenerateColumns="False"

AllowPaging="True" OnItemDataBound="rgStaffPhysicianDetails_ItemDataBound" OnItemCommand="rgStaffPhysicianDetails_ItemCommand" >

 

<PagerStyle Mode="NumericPages"></PagerStyle>

 

<MasterTableView CommandItemDisplay= "Top" DataKeyNames="Prov_ID">

<

Columns >

 

<telerik:GridTemplateColumn HeaderText="Person Id" Visible="False" UniqueName="Per_ID">

<

ItemTemplate>

<

asp:Label ID="lblPersonId" Visible="false" runat="server" Text='<%# Eval("Prov_Per_IDSource.Per_ID")%>'></asp:Label>

 

<

asp:Label ID="lblProvID" Visible="false" runat="server" Text='<%# Eval("Prov_ID")%>'></asp:Label>

 

</

ItemTemplate>

</

telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Physician Name" UniqueName="Per_FullName">

<

ItemTemplate>

<

asp:Label ID="lblStaffName" runat="server" Text='<%# Eval("Prov_Per_IDSource.Per_FullName")%>'></asp:Label>

 

</

ItemTemplate>

</

telerik:GridTemplateColumn>

</

Columns>

<

ExpandCollapseColumn Resizable="False" Visible="False"><HeaderStyle Width="20px" /></ExpandCollapseColumn><EditFormSettings EditFormType="Template"><PopUpSettings ScrollBars="None" /> <FormTemplate >

 

<

telerik:RadTextBox ID="RadTextBoxCity" runat="server" Width="230px" TabIndex="8" OnTextChanged="City_TextChanged"</telerik:RadTextBox>

 
<telerik:RadComboBox ID="DropDownListState" runat="server" Width="230px" TabIndex="9" EnableLoadOnDemand="True" HighlightTemplatedItems="True" MarkFirstMatch="True" AutoPostBack="true" OnSelectedIndexChanged="ddlState_SelectedIndexChanged" OnDataBound="ddlState_DataBound"><collapseanimation duration="200" type="OutQuint"></collapseanimation></telerik:RadComboBox>

<telerik:RadComboBox ID="DropDownListZip" runat="server" Width="230px" EnableLoadOnDemand="True" HighlightTemplatedItems="True" MarkFirstMatch="True" AutoPostBack="true" TabIndex="10">

 

</telerik:RadComboBox>

 

asp:Button id="cmdButton" ValidationGroup="Check" runat="server" Text='Update' TabIndex="23" CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>'>

 

</asp:Button><asp:Button id="Button1" runat="server" Text="Cancel" TabIndex="24" CausesValidation="False" CommandName="Cancel">

 

</asp:Button > </FormTemplate>

 

<EditColumn UniqueName="EditCommandColumn1">

 

</EditColumn>

 

</EditFormSettings>

<RowIndicatorColumn Visible="False">

 

<HeaderStyle Width="20px" />

 

</RowIndicatorColumn>

</

MasterTableView>

</telerik:RadGrid>

 exist in that.

But OnSelectedIndexChanged="ddlState_SelectedIndexChanged"  event dcleration in the ItemDataBound event of the Radgrid control like

ddlState.SelectedIndexChanged +=

new RadComboBoxSelectedIndexChangedEventHandler(this.ddlState_SelectedIndexChanged);

So my question is that I am unable to get Zip control like DropDownListZip in the ddlZip_SelectedIndexChanged() event 

Please sort out my problem i am unable to get the ID of the DropDownListZip ....


Thanks
Pankaj Tyagi





 
Missing User
 answered on 29 Sep 2008
1 answer
105 views
HI,
I am trying to use this code supplied in another post
Protected Sub RadDockLayout1_SaveDockLayout(ByVal sender As ObjectByVal e As Telerik.Web.UI.DockLayoutEventArgs)   
    Dim dockState As String   
    Dim serializer As New Script.Serialization.JavaScriptSerializer()   
    Dim stateList As List(Of DockState) = RadDockLayout1.GetRegisteredDocksState()   
    Dim serializedList As New StringBuilder()   
    Dim i As Integer = 0   
    While i < stateList.Count   
        serializedList.Append(serializer.Serialize(stateList(i)))   
        serializedList.Append("|")   
        i += 1   
    End While   
    dockState = serializedList.ToString()   
    'Save the dockState string into DB   
End Sub   
 
protected Sub RadDockLayout1_LoadDockLayout(ByVal sender As ObjectByVal e As Telerik.Web.UI.DockLayoutEventArgs)  
    Dim serializer As New Script.Serialization.JavaScriptSerializer()   
    'Get saved state string from the database - set it to dockState variable for example   
    Dim currentDockStates As String() = dockState.Split("|")   
    For Each stringState As String In currentDockStates   
        If stringState <> String.Empty Then   
             Dim state As DockState = serializer.Deserialize(Of DockState)(stringState)   
             e.Positions(state.UniqueName) = state.DockZoneID   
             e.Indices(state.UniqueName) = state.Index   
        End If   
    Next 
End Sub 

however, i am getting..
Warning 2 'Public Sub New()' is obsolete: 'The recommended alternative is System.Runtime.Serialization.DataContractJsonSerializer.'. 

Any ideas ?
Thanks
Mark
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 29 Sep 2008
0 answers
102 views
i was able to find the control  inside radpanel itemtemplate. now my question is how do i retrieve that user controls value from another page. normally we would do request.form("") but how do we do it here? thank you for helping. really appreciate it.
appdev
Top achievements
Rank 1
 asked on 29 Sep 2008
0 answers
157 views
I am unable to create the Filtering facility in radgrid control on server side with the same option as client side,

Please give me the sample code to apply the all the combination of the selected list of the columns for search criteria display in the radgrid (search option for each columns like contain, Not Contain, IsNull, NotNull etc,)

How to get the Filtering TextBox value with selected criteria(Less than, Greater Than, Contains, Not Contains etc)
pankaj
Top achievements
Rank 1
 asked on 29 Sep 2008
1 answer
104 views
Is there any thing like modal in RadAjax?
i.e when ajax request is taking place i do not want the user to access any control in the page.
The page should be disabled just like when we set modal property to true in Radwindow.
Any inbuild property for this.
Vlad
Telerik team
 answered on 29 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?