Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
445 views
Hi,

I have a simple page that has a Literal, a Repeater/Datalist and a DropDownList.  When there are no items in the Repeater the Literal is shown.  When an Item from the DropDownList is selected the Repeater is updated and the Literal is turned off.

This scenario is a much simplified version of what am I trying to achieve, designed as proof of the error.  The page works fine with a full postback or when using a regular AJAX UpdatePanel, but when I try to use the RadAjax Manager, the Literal updates as expected, but the Repeater does not (I have tried replacing the Repeater with a Datalist and get the same results). 

Here is some sample code...

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="DropDownList">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Literal" /> 
                    <telerik:AjaxUpdatedControl ControlID="Repeater " /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
          
    <div>  
        <ul> 
            <asp:Literal id="Literal" runat="server">This list is empty.</asp:Literal> 
            <asp:Repeater ID="Repeater" runat="server">  
                <ItemTemplate> 
                    <li> 
                        <%#Container.DataItem("Item")%> 
                    </li> 
                </ItemTemplate> 
            </asp:Repeater> 
        </ul> 
        <br /> 
        <div> 
            <asp:DropDownList ID="DropDownList" runat="server" AutoPostBack="true">  
                <asp:ListItem Text="Item One" Value="1" /> 
                <asp:ListItem Text="Item Two" Value="2" /> 
                <asp:ListItem Text="Item Three" Value="3" /> 
                <asp:ListItem Text="Item Four" Value="4" /> 
                <asp:ListItem Text="Item Five" Value="5" /> 
            </asp:DropDownList>    
        </div> 
    </div> 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not IsPostBack Then 
            LoadList()  
        End If 
    End Sub 
 
    Sub LoadList()  
        Repeater.DataSource = "MyDataSource" 
        Repeater.DataBind()  
        If Repeater.Items.Count > 0 Then 
            Repeater.Visible = True 
            Literal.Visible = False 
        Else 
            Repeater.Visible = False 
            Literal.Visible = True 
        End If 
    End Sub 
 
    Protected Sub DropDownList_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList.SelectedIndexChanged  
        'Add the Item here  
        LoadList()  
    End Sub 

If I do this, it works...

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
        <ContentTemplate> 
            <div>  
                <ul> 
                    <li id="Literal" runat="server">This list is empty.</li> 
                    <asp:Repeater ID="Repeater" runat="server">  
                        <ItemTemplate> 
                            <li> 
                                <%#Container.DataItem("BusinessName")%> 
                            </li> 
                        </ItemTemplate> 
                    </asp:Repeater> 
                </ul> 
                <br /> 
                <div> 
                    <asp:DropDownList ID="DropDownList" runat="server" AutoPostBack="true">  
                        <asp:ListItem Text="Item One" Value="17" /> 
                        <asp:ListItem Text="Item Two" Value="19" /> 
                        <asp:ListItem Text="Item Three" Value="20" /> 
                        <asp:ListItem Text="Item Four" Value="21" /> 
                        <asp:ListItem Text="Item Five" Value="22" /> 
                    </asp:DropDownList>    
                </div> 
            </div>     
        </ContentTemplate> 
    </asp:UpdatePanel> 

Any Ideas?
Matt
Top achievements
Rank 2
 answered on 01 Apr 2009
1 answer
120 views
I have a radgrid and when a row is selected and a button is pressed I process the button and go to another page to process the information.

But if no row is selected I want to issue an alert telling the user to select a row and stay on the same page.  Just how can I make this happen?

I am able to display an alert using the javascript page load function and by adding a function call to the onClientClicked Event.  But how can I call the rad alert based on what happens in the server side button code? 

I would also like to do the same thing on another page passing it an html string of errors that occur that need to be corrected before allowing the user to submit the page.  So somehow I would need to pass this string to the javascript function.

I guess I'm a little green in the asp.net to javascript relationship so any help is appreciated!

thanks
Georgi Tunev
Telerik team
 answered on 01 Apr 2009
1 answer
111 views
Hello,

I have a problem with the background of controls when they are ajaxyfied. Indeed, here is the procedure :
_ Put a RadFormDecorator with Black skin
_ Put a fieldset
_ Put a checkbox in the fieldset
_ Add this checkbox in a RadAjaxManager

When a postback is done, then the background around the checkbox is not like the fieldset but like the page background...
I have noticed the same problem in the Telerik example for RadFormDecorator->Partial Page Updates ( Example ). When you click on the "callback" button the background is changing...

My version is Q1 2009 for ASP.NET AJAX
With this behavior we can not use it, Is there a workaround ?
Georgi Tunev
Telerik team
 answered on 01 Apr 2009
1 answer
92 views
I try to user RadToolTip, in FF the tip is Normal, but in IE the content of tip is out of the container
This is my ASCX file

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="View_ShowPicture.ascx.cs" Inherits="hqdai.Modules.EO_Pictures.View_ShowPicture" %> 
<%@ 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" %> 
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>  
<link rel="stylesheet" href='/css/Shadow.css' media="screen" type="text/css"/><link rel="stylesheet" href='/css/Shadow.css' media="screen" type="text/css"/> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
    <link rel="stylesheet" href='<%= FileLocation()%>/css/Shadow.css' media="screen" type="text/css"/> 
</telerik:RadCodeBlock> 
<asp:DataList ID="dlShowPic" runat="server" RepeatColumns=2> 
    <ItemTemplate> 
        <div class="img-shadow"> 
            <img id='<%# Eval("PicID")%>'  src='<%# getPicture(DataBinder.Eval(Container.DataItem, "Picture").ToString())%>'  
                                height=70px /> 
        </div> 
        <telerik:RadToolTip ID="RadToolTip1" runat="server"  
                            TargetControlID='<%# Eval("PicID")%>'   
                            Animation=Fade  
                            Position=TopCenter  
                            IsClientID="true"  
                            BorderStyle="None" 
                            Skin="Web20" 
                            ContentScrolling="None"> 
            <table> 
                <tr> 
                    <td align="center"> 
                        <div class="img-shadow"> 
                            <img src='<%# getPictureThumb(DataBinder.Eval(Container.DataItem, "Picture").ToString())%>'  /> 
                        </div> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="center"> 
                        <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title")%>' CssClass="DNormalBold"></asp:Label> 
                    </td> 
                </tr> 
            </table> 
             
        </telerik:RadToolTip>  
    </ItemTemplate> 
</asp:DataList> 
         
 

Display in FF and IE
I uploaded the photo in my spaces : Photo

Svetlina Anati
Telerik team
 answered on 01 Apr 2009
2 answers
640 views
I can get an instance of the combobox but can't seem to get the currently selected value using Javascript.

Thanks
Acadia
Top achievements
Rank 1
Iron
 answered on 01 Apr 2009
1 answer
144 views
I got a radgrid which shows customers. When user clicked one of the customers at left side I have to show products we sold to the customers.
Even if I know when row selected "onrowselect" client side event fire. I dont know how I pass key value to the other grid I used to show products we sold selected customer. Moreover, before user clicked one of customer rows I have not to show sold products radgrid.

So, shortly I have to radgrid when one of the grid row selected other radgrid will be populated and become visible, thank you in advance and all helps will be appreciated. Thank you in advance.
nagarjun
Top achievements
Rank 1
 answered on 01 Apr 2009
0 answers
131 views
Hi,

I want to upload multiple files using only one file input without going to server side untill i press submit button.
ie. my requirement is,
i will be havng only the browse button(ControlObjectsVisibility="None").

After we have browsed, added the attachment, they should appear below the browse box with a red X next to it to delete it if we want.  we can then simply just browse and add another if you want(ie we have to clear the input field after browsed a file).

Then only when i press the submit button, i have to save all at server side.

can we do it using rad upload contrl? if yes please give me sufficient guideline.

Thanks & regards
Anju


please help me, can i do this usingrad upload?

Thanks & Regards
Anju

anju
Top achievements
Rank 1
 asked on 01 Apr 2009
2 answers
193 views
HI,

Can i change the upload control buttons positions in anyway. I need the add button to be at  the right of the browse button,  so that all buttons on the same line.

i hope u got my purpose.

Thanks & Regards
Anju
anju
Top achievements
Rank 1
 answered on 01 Apr 2009
4 answers
150 views
Hi,

I vahe implemented row selection using the EnablePostBackOnRowClick property. How can I access the content of a specific cell in the selected row from the event handler (OnItemCommand)?

Best regards,
Robert
sumanth
Top achievements
Rank 2
 answered on 01 Apr 2009
1 answer
81 views
Hi,
I saw that header's background in my grid has some free, gray space.
I made print screen:
http://img167.imageshack.us/img167/7905/gridbugheader.jpg
Which css rules schould I rewrite and how?
Dimo
Telerik team
 answered on 01 Apr 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?