Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
112 views
Hello,

I am using loadondemand for a radcombobox control as follow:

<telerik:RadComboBox ID="DDL_district" Runat="server"
DataSourceID="DS_district" DataTextField="fullAddress  
DataValueField
="recID" Width="100%" AppendDataBoundItems="True"
                            EnableAutomaticLoadOnDemand="True" Filter="Contains"
                            MinFilterLength="3" ShowMoreResultsBox="True"
                            EnableVirtualScrolling="True" ItemsPerRequest="10"
                            LoadingMessage="Loading...."
                            EmptyMessage="No such district in the database."
                            MaxHeight="250px">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Selected="True"
                                    Text="some text"
                                    Value="0" />
                            </Items>
                          </telerik:RadComboBox>

when I try to obtain the selected value in run-time I always get "0" value even if I select an item from database.
I use following code to get districtID value

Dim districtID As String = DDL_district.SelectedValue

Am I missing something?
Dimitar Terziev
Telerik team
 answered on 03 Jan 2011
5 answers
117 views
I did some search and looks like opening the radWindow is eash, just use "RadWindow1.VisibleOnPageLoad = True" on a button click will do the trick.

But closing the window is complicate.  Why do I have to use javascript to close it?  Is there an easier way to close it after postback?
Svetlina Anati
Telerik team
 answered on 03 Jan 2011
6 answers
108 views
How can I make anchors on a page visible in the Design Mode?

They seem to be always hidden.

BR,
Marc
Dobromir
Telerik team
 answered on 03 Jan 2011
5 answers
140 views
Hi,

 I am using the RadCalendar in my webpage. While clicking on the particular date i did open the radwindow in that window i am having 3 textboxes , after entering the values in that, need to display on the particular date of that Calendar page...Now i am able to display one value ,,but how to do another two values. Tell me how to do?
Brown
Top achievements
Rank 1
 answered on 03 Jan 2011
6 answers
165 views
Hello,

I'm currently prototyping a menu where I want a child menu item to make an Ajax call, alter the Image on the parent menu, and then close the parent menu.  Here is my menu:

<Telerik:RadMenu ID="Menu_gob" runat="server" Skin="Default" OnClientItemClicked="MenuItemClicked"
    <Items> 
        <Telerik:RadMenuItem Value="AllTopics" Text="Top/All Topics" /> 
        <Telerik:RadMenuItem Value="CurrentTopic" Text="Page Lifecycle" ImageUrl="~/CABS_Images/Icon_NotSubscribed.png"
            <Items> 
                <Telerik:RadMenuItem Value="CurrentTopicNewThread" Text="Start a New Thread" ImageUrl="~/CABS_Images/Icon_NewDocument.png" /> 
                <Telerik:RadMenuItem Value="CurrentTopicSubscription" Text="Turn ON Notifications" ImageUrl="~/CABS_Images/Icon_Subscribed.png" /> 
            </Items> 
        </Telerik:RadMenuItem> 
        <Telerik:RadMenuItem Value="CurrentThread" Text="NEW THREAD, 2, 3, 4..."  ImageUrl="~/CABS_Images/Icon_Subscribed.png"
            <Items> 
                <Telerik:RadMenuItem Value="CurrentThreadNewPost" Text="Post a Reply" ImageUrl="~/CABS_Images/Icon_NewDocument.png" /> 
                <Telerik:RadMenuItem Value="CurrentThreadSubscription" Text="Turn OFF Notifications" ImageUrl="~/CABS_Images/Icon_NotSubscribed.png" /> 
            </Items> 
        </Telerik:RadMenuItem> 
        <Telerik:RadMenuItem Value="NewPost" Text="Post a Reply" ImageUrl="~/CABS_Images/Icon_NewDocument.png" /> 
        <Telerik:RadMenuItem Value="CannotPost" Text="This Thread is Read-Only" ImageUrl="~/CABS_Images/Icon_CannotPost.png" /> 
    </Items> 
</Telerik:RadMenu> 
 

I use the OnClientItemClicked event currently just to check the item being clicked, toggle the images, and close the menu.  There's no Ajax involvement yet.

<script language="javascript" type="text/javascript"
    var subbed_gbl = false
    function MenuItemClicked(sender, args) { 
        var clickedMenuItem = args.get_item(); 
        if (clickedMenuItem.get_value() == 'CurrentTopicSubscription') { 
            var CurrentTopicMenuItem = $find("<%= Menu_gob.ClientID %>").findItemByValue('CurrentTopic'); 
            subbed_gbl = !subbed_gbl; 
            if (subbed_gbl) { 
                clickedMenuItem.set_imageUrl('<%= Application("ApplicationPath") %>/CABS_Images/Icon_NotSubscribed.png'); 
                clickedMenuItem.set_text('Turn Off Notifications'); 
                CurrentTopicMenuItem.set_imageUrl('<%= Application("ApplicationPath") %>/CABS_Images/Icon_Subscribed.png'); 
            } else { 
                clickedMenuItem.set_imageUrl('<%= Application("ApplicationPath") %>/CABS_Images/Icon_Subscribed.png'); 
                clickedMenuItem.set_text('Turn On Notifications'); 
                CurrentTopicMenuItem.set_imageUrl('<%= Application("ApplicationPath") %>/CABS_Images/Icon_NotSubscribed.png'); 
            } 
            //  CurrentTopicMenuItem.blur(); 
            //  CurrentTopicMenuItem.set_selected(false); 
            //  CurrentTopicMenuItem.close(); 
            sender.close(); 
        } 
    } 
</script> 
 

This works, except that immediately after the menu closes, it opens again.  As you can see, I've tried a few different things.  I've closed it, blurred it, un-selected it, and in various different orders.  I've done this by referencing both "sender" and "CurrentTopicMenuItem", which I programmatically set to the parent menu item.  None of them do the trick.  The menu always closes and then immediately opens again.

(Note that <%= Application("ApplicationPath") %> is just a way to reference the root of the web since it can vary from development to production.)

Can you help?


Yana
Telerik team
 answered on 03 Jan 2011
6 answers
165 views
I'm using a Progress Area Control to monitor the progess of some code (actually just calling System.Threading.Thread.Sleep(4000)) for right now to simulate code doing stuff. Anyway, it runs fine until it finishes, at which point both the progress bar and the OperationText seem to "reset" back to the first thing I set it to.

For example.

I initially set the PrimaryPercent to 0 and the CurrentOperationText to:  "Initialization started...". the last thing I do is set the PrimaryPercent to 100 and the CurrentOperationText to:  "Initialization Complete...".  It shows this on screen but then seems to reset the PrimaryPercent to 0 and the CurrentOperationText back to:  "Initialization started..." before the page response is finished.

Any idea why? I'm setting the progressContext.OperationComplete = True before the final update. Here's my full code:

<asp:button runat="server" ID="btnInitialize" Text="Initialize" CssClass="button" />    
 
<telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
    <telerik:RadProgressArea ID="rpaInit" Width="100%" ProgressIndicators="TotalProgressBar, CurrentFileName" runat="server" Skin="GCSD" EnableEmbeddedSkins="false">
      <ProgressTemplate>
        <ul class="ruProgress" runat="server">
                <li class="ruProgressHeader" runat="server"><span id="ProgressAreaHeader" runat="server"></span></li>
                <li class="ruFilePortion" runat="server"><div id="PrimaryProgressBarOuterDiv" class="ruBar" runat="server"><div id="PrimaryProgressBarInnerDiv" runat="server"></div></div></li>
                <li class="ruCurrentFile width100Percent" runat="server"><span class="lblCurrentOperationTitle">Status:</span><asp:label runat="server" id="CurrentOperation" class="lblCurrentOperation" /></li>
            </ul>
    </ProgressTemplate>
     
<Localization Uploaded="Uploaded"></Localization>
     
    </telerik:RadProgressArea>


Private Sub UpdateProgressMessage(ByVal progressContext As Telerik.Web.UI.RadProgressContext, ByVal strMessage As String, ByVal intPercentComplete As Integer)
        Dim strScript As String
        Dim writer As New StringWriter
  
        progressContext.PrimaryPercent = intPercentComplete
        progressContext.CurrentOperationText = String.Format("{0}", strMessage)
  
        progressContext.Serialize(writer)
  
        strScript = String.Format("{1};Sys.Application.add_load(function(){{$find(""{0}"").update(rawProgressData);}});", rpaInit.ClientID, writer.GetStringBuilder().ToString())
  
        ClientScript.RegisterStartupScript(Me.[GetType](), "", strScript, True)
  
  
    End Sub
    Private Sub btnInitialize_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnInitialize.Click
        Dim progressContext As RadProgressContext = RadProgressContext.Current
    
        rpaInit.DisplayCancelButton = False
  
        UpdateProgressMessage(progressContext, "Initialization started...", 0)
  
        System.Threading.Thread.Sleep(2000) 'delay it a couple seconds
  
        UpdateProgressMessage(progressContext, "Loading Stuff...", 25)
  
        System.Threading.Thread.Sleep(4000)
  
        UpdateProgressMessage(progressContext, "Loading More Stuff...", 50)
  
        System.Threading.Thread.Sleep(5000)
  
        UpdateProgressMessage(progressContext, "Loading Even More Stuff...", 75)
  
        System.Threading.Thread.Sleep(5000)
  
        progressContext.OperationComplete = True
  
        UpdateProgressMessage(progressContext, "Initialization Complete", 100)
  
    End Sub

Paul J
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
73 views
I am using the RadCalendar, I need to Edit the displayed values. I displayed 3 values on a particular date, After entering the values need to update those values. what i should to do?
Brown
Top achievements
Rank 1
 answered on 03 Jan 2011
1 answer
118 views
Hello everybody,

First, I want to apologize for my poor english.
I'm trying to fill a asyncupload when the page loads.
The page in question is made to modify a Business Object and I want when the page load that the asyncupload is filled if a file has already been uploaded for this BO.
If it's not clear tell me in order to explain this better.
Genady Sergeev
Telerik team
 answered on 03 Jan 2011
3 answers
174 views
Hello, yes, I know the problem is overdiscussed, but I tried all the workarounds proposed by you, still doesn't work for me..

I set ReloadOnShow = false, put the code do disable cash in PreRender handler :

Response.Cache.SetCacheability(

HttpCacheability.NoCache);
Response.Cache.SetNoServerCaching();
Response.Cache.SetNoStore();
Response.AppendHeader(
"Pragma", "no-cache");
Response.Expires = -1;
Response.CacheControl =
"no-cache";

But the page still loads twice.

 

Georgi Tunev
Telerik team
 answered on 03 Jan 2011
2 answers
81 views
I have a grid that I would like to "remember" selected items (checkbox) when the user sorts the grid.  I found an article that shows how to do it client side (http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html) - as I want to avoid a postback every time they select an item.  It works very nicely - as long as the selected item in on the current page they are viewing.  If there are more than one page of records (ie showing 10 out of 200) - and the selected record is sorted to the end of the list and doesn't show, it forgets that it was checked.  The on row created doesn't seem to fire as the row really isn't created.  Is there a way around this?

Thank you in advance,
John

John
Top achievements
Rank 1
 answered on 03 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?