Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
122 views
I have a scenario and I'm struggling with the best way to implement it using Rad Ajax controls.

The system I have has a very custom single sign on process with multiple redirects and code execution. Here is the current flow:

1. Enter info, click Login button
2. Redirect to Site 2
3. Site 2 does it's thing (outside of my control)
4. Site 2 redirects back to Page 2 on Site 1
5. Page 2 does all sorts of processing, multiple web service calls to multiple sites
6. Upon completion, Redirect to Site 3
7. Site 3 does its thing (I have control of this site and on same server as Site 1)
8. Site 3 redirects back to Site 1
9. Done

This whole process takes anywhere from 5-35 seconds on different computers, connections, etc. So I'm trying to figure out a way to give the user a better experience. Currently, the browser does not display any other pages other than Page 1 on Site 1. All of the other redirects and pages listed above are simply blank pages with code behind. So the user doesn't even know they are being redirected multiple times.

I'm almost 99% sure I can't do anything with Ajax when it involves redirects...? If that assumption is correct, my only option is to do something with Step 5 above. Since Page 2 on Site 1 does all the code processing, web service calls, etc. I am thinking I can Ajax that page. Currently all the code for that page simply executes on page load, then redirects.

How can I put an Ajax Loading Panel on the page and get it to fire on Page_Load, have all the code execute, and then redirect when finished? My initial thought is to put a timer on Page_Load that will basically pause things for a split second, once the timer completes it would fire off the function that handles the code execution (and the Loading Panel display), once the code execution completes it would redirect as normal.

I'm looking for the best implementation here, so even if I'm way off base, I'd appreciate any ideas. Thanks.
Veli
Telerik team
 answered on 11 Aug 2009
1 answer
101 views
I have wasted a lot of time today because I did not fully understand the control hiarcy of the RadGrid.
 My problem was that I were not able to get the values from the editedItem controls.

My grid has a  GridTemplateColumn like this 


<
telerik:GridTemplateColumn UniqueName="doc_name_org" HeaderText="Document">

 

<HeaderStyle CssClass="colored_header" Width="40%" />

 

 

 

<ItemStyle CssClass="colored" Width="40%" />

 

 

 

<ItemTemplate>

 

 

 

<asp:ImageButton ID="lnk_doc_name_org_img" Style="border: 0px; vertical-align: middle;" runat="server" />

 

 

 

<asp:HyperLink ID="lnk_doc_name_org_txt" runat="server"></asp:HyperLink>

 

 

 

</ItemTemplate>

 

 

 

<EditItemTemplate>

 

 

 

 <asp:TextBox ID="txtFileName" CssClass="small" Style="float: left" runat="server" Text="" Width="60%"></asp:TextBox>

 

 

 

 <input type="button" style="float: right" causesvalidation="false" id="btnGetExtraDoc" runat="server" class="button_small" value="Get document" />

 

 

</EditItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

 


Handling the ItemTemplate was ok, but the EditItemTemplate was a bit more tricky.
Every example I came across used this methode to get the value from the textbox txtFileName

 

 

Dim DocName As String = TryCast(editedItem("doc_name_org").Controls(0), TextBox).Text

But of course it was not that simple. It turned out that I had to use .Controls(1) to get the textbox value.

 


I find this a bit confusing because I actually would expect the textbox to be control(0) and the button to be control(1)....
Any explenations for this? Is control(0) the ItemTemplate and Control(1) the EditTemplate?
If so, I must have missed this explenation somewhere....

To remove the posibility of messing this up later on I figured I should use another approach that does not relay on me to get the index right.

So, the following line accomplishes the same result, but more failsafe. I can add/remove controls without any damage.

Dim
DocName2 As String = TryCast(e.Item.FindControl("txtFileName"), TextBox).Text

I think the examples for Telerik Controls should also demonstrate more complex implementations and give explenations for them, not just basic implementations.

Hope this helps someone.

regards
Alexander

 

 

 

Tsvetoslav
Telerik team
 answered on 11 Aug 2009
1 answer
106 views
Hi,

I have added an Attachment custom attribute to my scheduler. To upload the attached files I use RadWindow. This is from AdvancedForm.ascx:


<script type="text/javascript">  
   function openRadWindow()  
   {  
       var oWnd = radopen("DesktopModules/Calendar/AppointmentForms/UploadFiles.aspx", "RadWindow1" );  
                oWnd.center();  
   }  
</script> 
 
 <telerik:RadWindowManager ShowContentDuringLoad="false" AutoSize="false" Skin="Vista"
    ID="RadWindowManager1" runat="server" VisibleStatusbar="false" Height="300px" Width="400px">
        <Windows>
            <telerik:RadWindow ID="RadWindow1"
            runat="server"
            Title="File Upload"
            Height="300px"
            Width="400px"
            Left="200px"
            DestroyOnClose="true" 
            VisibleStatusbar="false" 
            ReloadOnShow="true" />
        </Windows>
</telerik:RadWindowManager>

<

 

asp:Panel runat="server" ID="AdvancedControlsPanel" CssClass="rsAdvMoreControls">

Attachments:

 

<asp:Label runat="server" ID="lblAttachment"><%# ShowAttachments() %> </asp:Label><br /> 
<a href="#" onclick="openRadWindow(); return false;">Add files</a> 
 

Everything works great until I add this control to my DNN site. Then the window shows the scheduler page instead of the upload page. What could be the problem?

Thanks,
Julia
Dimitar Milushev
Telerik team
 answered on 11 Aug 2009
1 answer
89 views
I have a textBox and Radgrid on Parentpage....
if i click edit Button inside radgrid i want to set texbo
x(outside radgrid) value to Somevalue.....

I have used following Code in ItemCommand Event

       If e.CommandName = "Edit" Then

            Dim index As Integer = e.Item.ItemIndex

            Dim item As Telerik.Web.UI.GridDataItem = RadGrid1.Items(index)

            Dim nitem As Integer
            nitem = Server.HtmlDecode(item("pnv_id").Text)
            textBox1.text=nitem
        End If

I M using EditPopupForm mode..when i click on edit Button inside grid.Popup Form Appears but .textbox value is Not Changed


Please Suugest a Solution for This.

Yavor
Telerik team
 answered on 11 Aug 2009
1 answer
93 views
Hi,

I am currently replacing my radScheduler edit form using Replacing The Edit Form and Client Side Objects

My radScheduler is grouped by "Studios" (Rehearsal Studios). And "Studios" are "Blue", "Red", "Yellow", ...

And my current code is
            function AppointmentInserting(sender, eventArgs) { 
                var start = formatDate(eventArgs.get_startTime()); 
                // New appointment 
                window.radopen("AdvancedForm.aspx?Mode=Insert&Start=" + start+"&Studio="+ groupby , "AdvancedForm"); 
                eventArgs.set_cancel(true); 
            } 

I would like to obtain the text of the clicked column ("Blue", "Red", "Yellow", ....) and not "Studios" in groupby

The incorrect code I've used is

var groupby = sender.get_groupBy() 

Have you got an idea ?

Thank you,

Adrien

Peter
Telerik team
 answered on 11 Aug 2009
4 answers
125 views
hi
in my project i want in first usercontrol bind a treeview and click on treeview show me other user control.
now. i don't know how i can that because second user control in postbak is hidden and treeview in postbak and !postback rebinded.

my sample project


http://www.telerik.com/help/aspnet-ajax/grdusercontrolruntimeload.html
http://www.telerik.com/help/aspnet/ajax/ajxshowhideloadingpanel.html
http://www.telerik.com/help/aspnet-ajax/ajxloadusercontrols.html
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/usercontrol/defaultcs.aspx

please help me
thank a lot
Veli
Telerik team
 answered on 11 Aug 2009
1 answer
109 views
on page load if a condition is met then i want the tabstrip to move to a tab and multiview page is this possible?
Shinu
Top achievements
Rank 2
 answered on 11 Aug 2009
1 answer
162 views
Hello sir

            i want to fix size the height and widht of grid. Grid height is fix. It will automatically manage internal content in the grid. how  to fix the property of grid.


Princy
Top achievements
Rank 2
 answered on 11 Aug 2009
1 answer
229 views


the menu's zindex seems to be set t0 8000 which puts it above everything else ... soemtime this isnt desired see http://demos.telerik.com/aspnet-ajax/menu/examples/default/defaultcs.aspx and click on the search drop down at the top left, in my example the menu is "floating" above my radwindows ...


Do i drop the zindex of menu or raise everything else ?




kevin
Shinu
Top achievements
Rank 2
 answered on 11 Aug 2009
3 answers
112 views
I'm using the FormDecorator/Office2007 to improve the appearance of the default ASP Wizard control.  The challenge I'm running into is applying a style to the button representing the active step (SelectedItem Template).  Ideally I'd like to have the selected button/active step show as a highlighted button (hover effect) using the same Office2007 skin.  Is there a way to hard-code that via CssClass attribute for the Button declaration?

 <asp:Wizard ID="paramWizard" runat="server" Width="910px" Height="350px">
        <SideBarTemplate>
            <asp:datalist runat="Server" id="SideBarList" ItemStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:button runat="server" ID="SideBarButton" Width="160px"/>
                </ItemTemplate>
                <SelectedItemTemplate>
                    <asp:Button ID="SideBarButton" runat="server" Width="160px"/>  
                </SelectedItemTemplate>
            </asp:datalist>
        </SideBarTemplate>
    </asp:Wizard>

Thanks,
-Mark

Georgi Tunev
Telerik team
 answered on 11 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?