Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
128 views
I am farely new to Telerik, First I ran into a problem where I could not load multiple RadAjaxManger on multiple user controls. I read a couple threads on this and found a solution that is working for me, Here. Problem now is that the listview is updating and everything on the server side  and the javascript part is working as well, but when it is done, the listview disappears. Can anyone see what i am doing wrong? Thanks for any answers.
ListView(UserControl)
<telerik:RadAjaxManagerProxy  ID="FullAlbumAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rdoSortDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rdoSortName">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy >
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0" />
    <asp:Panel ID="ListViewPanel1" runat="server">
     <div>
        <asp:RadioButton runat="server" ID="rdoSortDate" Text="Sort by date" AutoPostBack="true"
            OnCheckedChanged="rdosortDate_Change" GroupName="Sorter" />
        <br />
        <asp:RadioButton runat="server" ID="rdoSortName" Text="Sort by Name" AutoPostBack="true"
            OnCheckedChanged="rdosortName_Change" GroupName="Sorter" />
       <asp:Button runat="server" ID="ResyncFullAlbum" Text="Resync Full Album"
             onclick="ResyncFullAlbum_Click"/>
    </div>
        <telerik:RadListView ID="lvFullControlAlbums" AllowPaging="true" runat="server" GroupItemCount="5"
            OnPageIndexChanged="Pager_Change" OnItemDataBound="AlbumSetup">
            <ClientSettings>
                <ClientEvents OnListViewCreated="SetupListviewAccess"></ClientEvents>
            </ClientSettings>
            <LayoutTemplate>
                <table id="Table2" runat="server">
                    <tr id="Tr1" runat="server">
                        <td id="Td3" runat="server">
                            <table id="groupPlaceholderContainer" runat="server" border="0" style="">
                                <tr id="groupPlaceholder" runat="server">
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr id="Tr2" runat="server">
                        <td id="Td4" runat="server" style="">
                            <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="lvFullControlAlbums"
                                PageSize="10">
                                <Fields>
                                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                                    <telerik:RadDataPagerTemplatePageField>
                                        <PagerTemplate>
                                            <div style="float: right">
                                                <b>Items
                                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" />
                                                    to
                                                    <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.TotalRowCount > (Container.Owner.StartRowIndex+Container.Owner.PageSize) ? Container.Owner.StartRowIndex+Container.Owner.PageSize : Container.Owner.TotalRowCount %>" />
                                                    of
                                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" />
                                                    <br />
                                                </b>
                                            </div>
                                        </PagerTemplate>
                                    </telerik:RadDataPagerTemplatePageField>
                                </Fields>
                            </telerik:RadDataPager>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
            <EmptyDataTemplate>
                <table id="Table1" runat="server" style="">
                    <tr>
                        <td>
                            No shared or created albums.<a href="#" id="NoDataCreateAlbum">Create New Album.</a>
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
            <EmptyItemTemplate>
                <td id="Td1" runat="server" />
            </EmptyItemTemplate>
            <ItemTemplate>
                <td id="Td2" runat="server" style="display: inline-block; position: relative; margin: 0.7em;
                    text-align: left; vertical-align: top;">
                    <asp:HiddenField runat="server" ID="ShareCounter" />
                    <div id="HypeShareAlbum" style="padding: 0; margin: 0">
                        <input type="hidden" value="<%#Eval("ID") %>" />
                        <asp:HyperLink runat="server" ID="hypShareAlbum"></asp:HyperLink>
                        <input type="hidden" value="<%#Eval("CreatorID") %>" />
                    </div>
                    <div class="EditAlbumClass">
                        <asp:ImageButton ToolTip='<%#Eval("AlbumDescription") %>' runat="server" ID="AlbumImage"
                            Width="110" Height="110" ImageUrl='<%#Eval("AlbumDefaultImageUrl") %>' /></div>
                    <img src="../SiteImages/private.png" style="margin: 0" />
                    <span style="margin: 0">photos:
                        <%#Eval("PhotoCount")%></span><br />
                    <div id="hypDeleteAccess" style="padding: 0; margin: 0">
                        <input type="hidden" value="<%#Eval("ID") %>" />
                        <asp:LinkButton runat="server" ID="hypeDeleteAlbum" Visible="false" Text="Delete Album"></asp:LinkButton>
                        <asp:HyperLink ID="hypeDeleteMyAccess" runat="server" Visible="false" Text="Remove my Access"></asp:HyperLink>
                    </div>
                    <div class="EditAlbumClass">
                        <asp:HyperLink runat="server" ID="EditAlbum" ToolTip='<%#Eval("AlbumDescription") %>'
                            Font-Underline="false">
                            <p class="titleAlbums" runat="server" id="pTitle">
                                <%#Eval("AlbumName") %></p>
                        </asp:HyperLink></div>
                </td>
            </ItemTemplate>
            <GroupTemplate>
                <tr id="itemPlaceholderContainer" runat="server">
                    <td id="itemPlaceholder" runat="server">
                    </td>
                </tr>
            </GroupTemplate>
        </telerik:RadListView>
        <asp:HiddenField runat="server" ID="AccessChoice"/>
    </asp:Panel>
Code Behind c#
protected void Page_Load(object sender, EventArgs e)
       {
           manager1 = RadAjaxManager.GetCurrent(Page);
           manager1.AjaxSettings.AddAjaxSetting(manager1, lvFullControlAlbums);
           manager1.AjaxSettings.AddAjaxSetting(manager1, ListViewPanel1);
           manager1.AjaxSettings.AddAjaxSetting(manager1, FullAlbumCounter);
           manager1.AjaxSettings.AddAjaxSetting(FullAlbumAjaxManager1, lvFullControlAlbums);
           manager1.AjaxSettings.AddAjaxSetting(FullAlbumAjaxManager1, ListViewPanel1);
           manager1.AjaxSettings.AddAjaxSetting(FullAlbumAjaxManager1, FullAlbumCounter);
           manager1.AjaxSettings.AddAjaxSetting(ListViewPanel1, ListViewPanel1);
           manager1.AjaxSettings.AddAjaxSetting(ListViewPanel1, lvFullControlAlbums);
           manager1.AjaxSettings.AddAjaxSetting(ListViewPanel1, FullAlbumCounter);
           manager1.AjaxSettings.AddAjaxSetting(rdoSortDate, ListViewPanel1);
           manager1.AjaxSettings.AddAjaxSetting(rdoSortDate, lvFullControlAlbums);
           manager1.AjaxSettings.AddAjaxSetting(rdoSortName, ListViewPanel1);
           manager1.AjaxSettings.AddAjaxSetting(rdoSortName, lvFullControlAlbums);
           manager1.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(FullAlbumAjaxManager1_AjaxRequest);
            
       }
protected void FullAlbumAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
       {
           string accesschoice = AccessChoice.Value;
           bool resetFullList = false;
           string id = "";
           if (e.Argument != null)
           {
               id = e.Argument;
               if (accesschoice == "Delete Album")
               {
                   if (mygreatappz.control.Data.Albums.DeleteAlbum(id))
                   {
                       resetFullList = true;
                   }
               }
               else if (accesschoice == "Remove my Access")
               {
                   if (mygreatappz.control.Data.AlbumAcesses.RemoveAccess(GlobalClass.GlobalVariables.User.ID, id))
                   {
                       resetFullList = true;
                   }
               }
 
           }
           if (resetFullList)
           {
               List<Album> newAlbums = new List<Album>();
               foreach (Album album in GlobalClass.GlobalVariables.User.FullControlAlbums)
               {
                   if (album.ID != id)
                   {
                       newAlbums.Add(album);
                   }
               }
               GlobalClass.GlobalVariables.User.FullControlAlbums = newAlbums;
           }
           RebindData();
       }
JS file that makes the ajax call
if (option == 'Remove my Access') {
                        var album = $(this).prev().val();
                        $('[id$=AccessChoice]').val(option);
                        $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(album);
                        return false;
                    }
Maria Ilieva
Telerik team
 answered on 21 Oct 2011
0 answers
121 views
Hello All

Does this method really exist "RadScheduler.Rebind()" i am referring to the rebind().

I am using scheduler view in silverlight and that method cannot be found.

please advice.

regards
Manuel
Top achievements
Rank 1
 asked on 21 Oct 2011
2 answers
196 views
Window has to be resized pretty small to expose this page find attachment. An inner scroll bar is present for an incorrectly sized frame. Unless the main scrollbar is all the way to the right, you wouldn’t see the inner scroll bar, and know there’s stuff still at the bottom of that frame
Dobromir
Telerik team
 answered on 21 Oct 2011
2 answers
136 views


My radgrid have AllowAutomaticInserts and AllowAutomaticUpdates set to True.
Meanwhile user editing item, it is raised event that causes the end of editing item. In the Page PreRender, i wrote following code:


if (!clauseEdit && dgImpegni.EditItems.Count > 0)
{
dgImpegni.EditItems[0].Edit = false;
}
dgImpegni.Rebind();


Can i write similar code for the insert item ?

Vittorio
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
156 views
Hi,
In my project I have asp buttons, checkboxes and already have telerik buttons, grids etc. I want to set a custom skin for all of them.
In master page I put a skinmanager and formdecorator elements and set my custom skin. I used both of them because If I use only formdecorator asp controls affected from skin not telerik controls, or If I use only skinmanager, telerik controls affected from skin not asp controls. So I used all of them.
1- Are there a solution about using only one component for setting a skin to all controls(Asp and Telerik)
2- After building project, in Google Chrome there is no problem in skin, everything is working fine but in IE 9 all controls are looking very bad, in Firefox skin is working but positions are wrong. How can I solve?
In attachments you can see screen captures for Chrome, IE and Firefox.

Thank you.
Niko
Telerik team
 answered on 21 Oct 2011
1 answer
156 views
We are using Telerik latest version Q2 release.
And in case of disabled mode dropdown move little which is not happen in case of enable.

Please suggest how to resolve this issue..
Kate
Telerik team
 answered on 21 Oct 2011
1 answer
115 views
Hi,

I have a form with few fields, a RadGrid, an add button that adds items to the grid and save button that saves the form along with uploading the document.

One of the textboxes i have causes a postback on its text changed event.

Even though i dont select a file in the RadUpload button, i can sometimes see progress manager load by itself on postback of textbpx changes or on the button click event that adds item to grid, even though no file is selected. Also querystring contains RadURID.

How do i prevent progress monitor to come up when there is no file?
Genady Sergeev
Telerik team
 answered on 21 Oct 2011
1 answer
111 views
Hi All, I've a grid with self-referencing hierarchy. I can put the 'add new record' bar at the top of each table thus:

<MasterTableView CommandItemDisplay="Top">

However, I'd only like to display the bar for the top 2 levels and not any deeper levels. How could I do this. Thanks!
Princy
Top achievements
Rank 2
 answered on 21 Oct 2011
1 answer
100 views
Hi,

All my WCF services are REST and using uritemplates to invoke methods. Is there any sample that shows how to use LoadOnDemand/WCF with rest? (Especially how to configure uritemplate for RadTreeNodeData type)

TIA.
Barbaros Saglamtimur
Top achievements
Rank 1
 answered on 21 Oct 2011
1 answer
116 views
I have observed some very bad behavior with the Telerik RadMossEditor. In the Config.xml file I need to listen for the event OnClientLoad as follows.

<property name="OnClientLoad">mossEditorHandleClientLoaded</property> 

I've added my function mossEditorHandleClientLoaded into MOSSEditorTools.js everything works great. That is until our sysadmin  applied some MS Sharepoint updates. After running the SharePoint Configuration Wizard all of the files that I customized were overwritten with the stock ones in the .WSP installer package of this component, including the ToolsFile.xml which has my preferred button configuration for the edit control. 

As far as I can tell there is no other way to wire this up above that to modify those files in that directory which is the practice that Telerik's documentation recommends. This seems like a very brittle and broken approach, is there a better way?

Thanks.
Stanimir
Telerik team
 answered on 21 Oct 2011
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?