Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
512 views
Hi,

I have a question regarding the Ajax loading panel.

I have a page, showing thumbnails of an image; when these are clicked on the larger version is shown in a main image above.

I ajaxified this with Rad Ajax Manager, no problem. But if I add a Loading Panel, it's not shown. If however I ditch the Ajax Manager and wrap a Ajax Panel round the controls in question, the Loading Panel displays correctly; but in this case the thumbnails reload on Ajax postback too, which I don't want.

Can you tell me how to get this working with the AjaxManager? Here is my code snippet below:

<asp:Content ID="Content2" ContentPlaceHolderID="maincontent" Runat="Server">  
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>  
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="LoadingPanel1">  
    <AjaxSettings>  
        <rad:AjaxSetting AjaxControlID="repThumbnails">  
            <UpdatedControls>  
                <rad:AjaxUpdatedControl ControlID="imgPhoto" LoadingPanelID="LoadingPanel1" />  
            </UpdatedControls>  
        </rad:AjaxSetting>  
    </AjaxSettings>  
</rad:RadAjaxManager>  
<rad:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" MinDisplayTime="1000" Style="width: 570px;">  
    <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' alt="Loading..." title="Loading..." style="border: 0; padding-top: 180px;" />  
</rad:RadAjaxLoadingPanel>  
<h1>Photos</h1>  
<div id="photocontainer"><asp:Image ID="imgPhoto" runat="server" AlternateText="The Boathouse" ToolTip="The Boathouse" /></div>  
<asp:Repeater ID="repThumbnails" runat="server" OnItemDataBound="repThumbnails_ItemDataBound" OnItemCommand="repThumbnails_ItemCommand">  
    <HeaderTemplate><div id="thumbnailcontainer"></HeaderTemplate>  
    <ItemTemplate>  
            <div class="thumbnail"><asp:ImageButton ID="lnkThumb" runat="server" ToolTip="Enlarge" AlternateText="Enlarge" CommandName="ThumbnailClick" /></div>  
            <br id="rowBreak" runat="server" visible="false" class="clear" />  
    </ItemTemplate>  
    <FooterTemplate></div></FooterTemplate>  
</asp:Repeater>  
</asp:Content> 

Thanks, Matt
Pam Redrum
Top achievements
Rank 1
 answered on 30 Dec 2009
3 answers
112 views
Hi,
I'm having a problem clearing the values within a table and hoped for some input.  I have a table with values that can be entered by the user.  I also have a clear button, that when clicked executes javascript to set the value to "".  I've added a RadAjaxManager proxy to update the table when the clear button is clicked.  My problem is that the whole table disappears not just the values.  Can you tell me what I am doing wrong? 

<

 

asp:Table ID="IndexTable" runat="server" EnableViewState="false" >

 

 

</asp:Table>

 

 

<

 

asp:Button ID="btnClear" runat="server" Text="Clear" Width="85px"

 

 

    style="text-align:center;vertical-align:middle;margin-left:10px" 

 

    OnClientClick="ClearIndexData();" />  

 

<

 

telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

 

<script type="text/javascript" >

 

function ClearIndexData() {  

 

      
            //repository  
            repo = document.getElementById("ctl00_MainContent_hfRepoHint").innerText;  
 
            //custom indexes  
            for (i = 1; i <= 20; i++) {  
                if (document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "S") != null) {  
                    if (repo.charAt(0) == '5')  
                        document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "S").value = "";  
                    else  
                        document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "S").value = "";  
 
 
                }  
                else if (document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "R") != null) {  
                    if (repo.charAt(0) == '5')  
                        document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "R").value = "";  
                    else  
                        document.getElementById("ctl00_MainContent_radIndex" + i.toString() + "R").value = "";  
 
                }  
            }  
        } 

 

</script>
</telerik:RadScriptBlock>

 

 

 

 


And here is the RadAjaxManager proxy settings
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
 <AjaxSettings> 
     <telerik:AjaxSetting AjaxControlID="btnClear">  
         <UpdatedControls> 
             <telerik:AjaxUpdatedControl ControlID="IndexTable" /> 
         </UpdatedControls> 
     </telerik:AjaxSetting> 
 </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
Thanks in advance for any advice you can give me.
Chris
Daniel
Telerik team
 answered on 30 Dec 2009
1 answer
130 views
I posted a new thread last week but it doesn't appear to be listed, so I am posting it again.
 

I have the rating control implemented in a repeater that displays a list of documents (each of which has a unique document id), and I want to have one RadRating control associated with each document.  When a user clicks the rating control, I want to get the value of the rating gadget at the time it is clicked, and update the associated document with the rating. 

      

The problem is that I don’t know how to figure out the document id to get in order to update the data.  The service side event handler, OnRate returns the radrating object, but all this gives me is the value and no way to specify the document id.  Similarly, the client-side call, OnClientRated, you specify the name of the javascript function to call…with no parameters – it assumes the parameters are ‘sender’ and ‘args’.  

Please tell me how I can determine which id goes with which rating gadget in the repeater.

Thanks.

Tsvetie
Telerik team
 answered on 30 Dec 2009
4 answers
263 views
hi, i know we can load content url from any web page into radwindow using NavigateUrl properties.
but how do i perform the same thing using raddock?

tia
heriyanto binduni
Top achievements
Rank 1
 answered on 30 Dec 2009
19 answers
410 views
This may by a RadInput issue but I am having the problem with RadDatePicker.DateInput and RadTimePicker.DateInput so I'll put this here.

When the input boxes of these controls are rendered they are empty, it takes 200-1000 ms for their values to show in IE7.

This is not only ugly but is giving my some pretty nasty headaches when it comes to my generic dirty checking scripts.

I understand timeouts and IE are necessary for many workarounds for IE bugs but is there any chance that this will be fixed?

For a sample of this go to:
http://www.telerik.com/demos/aspnet/prometheus/Calendar/Examples/DatePicker/CustomPopup/DefaultCS.aspx

You will notice that the input fields of the date pickers are blank for a small period of time before being populated with their appropriate value.

Thanks

Guido Tapia
Dimo
Telerik team
 answered on 30 Dec 2009
1 answer
549 views
Hello All,
I have a ordinary RadGrid which has Sorting option set.
Columns in the RadGrid are named like this: Class1.Class2.Property1
because I use classes inside another ones in my Collections.

Everything works perfectly expect sorting.

When I set GridSortExpression in codebehind or in aspx page, setting fails if
field's name have a point character (.)
Code below fails:

  GridSortExpression expression = new GridSortExpression();
  expression.FieldName = "Class1.Class2.Property1"; // This fails!
  expression.SetSortOrder( ... );

....

Is there another kind of naming syntax for SortColumns or how should I get it working?
This is little bit odd because RadGrid data can be show, edit etc although names have point
characters (nested classes).

Br,

Michael

Tsvetoslav
Telerik team
 answered on 30 Dec 2009
3 answers
156 views
Hi,

I have used telerik:RadScriptManager  in my SharePoint Master page. RAD Controls are working fine.

Sample:

<

form id="Form1" runat="server" onsubmit="return _spFormOnSubmitWrapper();">

 

 

 

<WebPartPages:SPWebPartManager ID="m" runat="Server" />

 

 

<telerik:RadScriptManager ID ="as" runat="server"></telerik:RadScriptManager>

When i am try  to add/edit any item in sharepoint in-built  "contacts list" ( or any sharepoint in-built  lists like links, annoucements etc ), it is not saving. It will post back and comes back to the same page.
 
If i set to default master page which doesnt have  telerik controls,  is adding the new entries to the list.

Please help me to fix this issues....

Note: i have added all necesary entries in web.config file and DLLS to GAC and RAD Controls are working fine.

 

Mareeswaran Arunachalam
Top achievements
Rank 1
 answered on 30 Dec 2009
1 answer
133 views
I need to get this fixed or maybe someone has a work around that will help us complete the implementation of the Telerik Editor.

Here is the problem. I want to use the editor as a WYSIWYG editor. Additionally, I want the editor to inherit the specified styles of the website and thus when a user begins typing into the editor the font and style of their text matches that of the website. I have a test URL where you can see the difference in behavior -- http://editortest.dev1.thenetimpact.com/

Here is what is wrong. In IE, pull up the above link. Simply click in the text area and type "This is a test". Now, click on the HTML view at the bottom of the editor. You should see this:

<p>This is a test</p>

Now, pull up the above site in FireFox and do the exact same thing, this is what you will see:

<p></p>
This is a test<br />

Notice how in FF the text you type in is outside of the Paragraph tags. This is a problem because the styles are at the P level (on purpose) and thus if you look at them side by side you will see that the font is rendered differently in IE versus FF.

I can't believe I am going to say this but in this case I need FF to act more like IE because IE is in this case behaving as I believe to be correct. What is odd is in FF if you hit enter after the text, it will then wrap the text you typed in inside a new <P> block. Again, I think this is wrong because what happens then is additional white space is added to the top whereas in IE the initial text is simply dropped inside the first applied <P> tag.

Any ideas on how to get the initially typed text in FF to fall within the initial <P> tags like IE is doing?

I am using IE version 8.0.6001.18702 and FF version 3.5.5

Also, here is the code that is currently initializing the editor:

String[] imagePath = new String[1];
        String cssPath;

        protected void Page_Init(object sender, EventArgs e)
        {
            imagePath[0] = "~/Files/image";
            cssPath = "~/css/content.css";

            radeTest.CssFiles.Add(cssPath);

            radeTest.NewLineBr = false;
            radeTest.Content = "<p></p>";
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            radeTest.SetPaths(imagePath, EditorFileTypes.Images, EditorFileOptions.All);
            radeTest.SetPaths(imagePath, EditorFileTypes.Documents, EditorFileOptions.All);
            radeTest.SetPaths(imagePath, EditorFileTypes.Flash, EditorFileOptions.All);
            radeTest.SetPaths(imagePath, EditorFileTypes.Media, EditorFileOptions.All);
            radeTest.SetPaths(imagePath, EditorFileTypes.Template, EditorFileOptions.All);
           
            radeTest.ContentFilters = EditorFilters.FixUlBoldItalic | EditorFilters.IECleanAnchors | EditorFilters.MozEmStrong | EditorFilters.ConvertFontToSpan | EditorFilters.ConvertToXhtml | EditorFilters.IndentHTMLContent;
        }


Thank you,
Derek Bemis





Dobromir
Telerik team
 answered on 30 Dec 2009
1 answer
171 views
Hello,

Is it possible to drag items to different pages on the same grid? In your drag and drop example (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx), it is possible to reorder the items by dragging them to different positions, but it only works for items on the same page, so one cannot, for example, drag an item from page 1 to page 2. I was just wondering if this is possible to implement.

Thank you,
Josh
Dimo
Telerik team
 answered on 30 Dec 2009
2 answers
299 views
hi .
i have Hierarchy Grid Like This.
 <input id="radGridClickedpvrid" name="radGridClickedpvrid" style="position: static"
                        type="hidden" />
<input id="radGridClickedRowIndex" name="radGridClickedRowIndex" style="position: static"
                        type="hidden" />

<telerik:RadGrid ID="RadGridLineCount" runat="server" GridLines="None" AllowPaging="True" Skin="Office2007" PageSize="20"> 
            <MasterTableView> 
                <ExpandCollapseColumn Visible="True"> 
                </ExpandCollapseColumn> 
                <DetailTables> 
                    <telerik:GridTableView Name="UserPrivilage" DataKeyNames="pvgid" ClientDataKeyNames="pvgid" runat="server"> 
                        <ExpandCollapseColumn Visible="True"> 
                        </ExpandCollapseColumn> 
                        <DetailTables> 
                            <telerik:GridTableView Name="Clients" DataKeyNames="clientid" runat="server"> 
                                <ExpandCollapseColumn Visible="True"> 
                                </ExpandCollapseColumn> 
                                <DetailTables> 
                                    <telerik:GridTableView Name="Accounts" DataKeyNames="accountid" runat="server"> 
                                        <ExpandCollapseColumn Visible="True"> 
                                        </ExpandCollapseColumn> 
                                        <DetailTables> 
                                            <telerik:GridTableView Name="Providers" DataKeyNames="providerid" ClientDataKeyNames="providerid" runat="server"> 
                                                <RowIndicatorColumn> 
                                                    <HeaderStyle Width="20px" /> 
                                                </RowIndicatorColumn> 
                                                <ExpandCollapseColumn> 
                                                    <HeaderStyle Width="20px" /> 
                                                </ExpandCollapseColumn> 
                                            </telerik:GridTableView> 
                                        </DetailTables> 
                                    </telerik:GridTableView> 
                                </DetailTables> 
                            </telerik:GridTableView> 
                        </DetailTables> 
                    </telerik:GridTableView> 
                </DetailTables> 
            </MasterTableView> 
            <ClientSettings EnableRowHoverStyle="true"> 
            <Selecting AllowRowSelect="true" /> 
            <ClientEvents OnRowContextMenu="RowContextMenu" />             
            </ClientSettings> 
</telerik:RadGrid> 
here i want to fine the  pvgid datakey value at  Providers Detail Table in Java Script.here is my javascript

<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"> 
 
        <script type="text/javascript"> 
         
            function RowContextMenu(sender, eventArgs)  
            { 
                 
               if(eventArgs.get_tableView().get_name() == "Providers")  
                {  
              var pvridValue=eventArgs.getDataKeyValue("pvgid") 
                alert(pvridValue) 
                 document.getElementById("radGridClickedpvrid").value = pvridValue     
                // alert(GetNewValue) 
                document.getElementById("radGridClickedRowIndex").value = GetNewValue; 
                    var menu = $find("<%=RadCMenu1.ClientID %>");                  
                    var evt = eventArgs.get_domEvent(); 
                    var GetNewValue=eventArgs.getDataKeyValue("providerid"); 
                    //alert(GetNewValue) 
                    document.getElementById("radGridClickedRowIndex").value = GetNewValue; 
                    if(evt.target.tagName == "INPUT" || evt.target.tagName == "A")  
                        {  
                            return;  
                        }                   
 
                menu.show(evt);   
            
                }                              
            }  
</script> 
</telerik:RadScriptBlock> 

Can any one help me how to get the pvgid datakey value in Providers level in script. and i am able to getting the providerid datakey value.

Thank You.
Suresh K.



Suresh K
Top achievements
Rank 1
 answered on 30 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?