Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
1.2K+ views

I have a fairly complex page I have been working on but have been having some trouble of late adding some ajax to some of the page items.

The problem seems to be one of compatibility between the RadAjaxManager and the regular ASP.NET AJAX UpdatePanels.

Below I have put together a skeleton of how my page is constructed. I have stripped out all the guts of the various controls for the sake of brevity (and relevance). 

In this format the page does not work. For one, clicking a row on the parent grid should make the child grids update. That does not happen. I have been on this page all day and just can't seem to get all the bits working together.

Yesterday I had an UpdatePanel around pretty much the whole page. The child grids updates but other bits started to break.

Here it is

<masterpage> << Contains the ScriptManager
 
    <script>
        // Javascript in here
    </script>
 
    <asp:UpdatePanel>
        <telerik:RadWindowManager>
            <telerik:RadWindow>
                <asp:TabContainer>
                    <asp:TabPanel />
                    <asp:TabPanel />
                    <asp:TabPanel />
                </asp:TabContainer>
        </telerik:RadWindowManager>
    </asp:UpdatePanel>
 
    <asp:UpdatePanel>
        <table>
            [various standard form elements]
            <telerik:RadComboBox />
            <input type="Button"/>
        </table>
    </asp:UpdatePanel>
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
         <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="ParentGrid" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid1" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid2" />
                            <telerik:AjaxUpdatedControl ControlID="ChildGrid3" />
                           </UpdatedControls>
                    </telerik:AjaxSetting>
            </AjaxSettings>
    </telerik:RadAjaxManager>  
 
    <telerik:RadGrid ID="ParentGrid">
 
    </telerik:RadGrid>
 
    <asp:TabContainer ID="tc1" runat="server">
        <asp:TabPanel ID="tp1" runat="server">
            <telerik:RadGrid ID="ChildGrid1"/>
        </asp:TabPanel>
         
        <asp:TabPanel ID="tp2" runat="server">
            <telerik:RadGrid ID="ChildGrid2"/>
        </asp:TabPanel>
         
        <asp:TabPanel ID="tp3" runat="server">
            <telerik:RadGrid ID="ChildGrid3"/>
        </asp:TabPanel>
    </asp:TabContainer>
 
</masterpage>

One forum post I read somewhere suggested that I should not use the RadAjaxManager and instead just put UpdatePanels around all the things that need it. But that would not work for me as I have some popup forms that on closing call this bit of javascript to refresh the grids managed by the RadAjaxManager.

function refreshGrid(arg) {
    $find("<%# RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}

So ditching the RadAjaxManager is not an option.

Could someone please suggest the correct way to set out a page like this with the RadAjaxManager?



Rishi
Top achievements
Rank 1
 answered on 15 Jan 2014
1 answer
149 views
Hello,

I'm using OLAP connection to pivot grid, I have noticed that when i use the paging also Pivot Grid queries for the whole data set and displays the current page, on every page shift it does the same without using the initially retrieved data set or requesting for the current dataset. Its a huge performance hit in my case. is it possible to avoid this?

Regards,
Yohan
Vasil
Telerik team
 answered on 15 Jan 2014
6 answers
387 views
RadEditor into an application. For the moment RadEditor can be in us-Us, fr-FR and de-DE. But the application can be also in spanish(es-ES), ...
For the moment I coded this :

protected void Page_Load(object sender, EventArgs e){if (!this.IsPostBack){

RadEditor1.Language = Request.Cookies[CIndex.UICulture].Value;

}


But if  (Request.Cookies[CIndex.UICulture].Value == "es-ES") , RadEditor cannot translate in Spanish. I would like to use English as default language. I don't know how to check if RadEditor can translate. I am looking something like that :

if(!Radeditor.Languages.Contains(Request.Cookies[CIndex.UICulture].Value))
{
    RadEditor1.Language = "us-US";
}
else
{
    RadEditor1.Language = Request.Cookies[CIndex.UICulture].Value;
}

But my list Radeditor.Languages is empty. I don't know why. I don't use SpellCheking.

Thank you in advance,

Marcelo
Top achievements
Rank 1
 answered on 15 Jan 2014
4 answers
300 views
I would like to set the grid PagerStyle mode in code behind in order to display different pagers depending on various criteria (namely the available width expected on the particular screen the grid displays on). The criteria I will base this decision on are all available in code behind, but I can't seem to get the setting of the grid PagerStyler.Mode property to work. It seems to ignore anything I set in code behind and go with what is specified in the grid declaration. I have tried setting this in page load prior to the grid being bound and also in the item created event. Can you let me know how I can set the PagerStyle mode in code behind?

Thanks.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 15 Jan 2014
5 answers
293 views
Hello
i added asp image and image buttons in rad list view read from DB source
my problem i cant get selected picture form rad button to so image
  <asp:Image ID="Image1" runat="server" Width="300px" />
                    <br />
                    <telerik:RadListView ID="RadListView3" runat="server" AllowPaging="True"
                    onselectedindexchanged="RadListView3_SelectedIndexChanged"
                      OnItemDataBound="RadListView3_ItemDataBound" PageSize="4"
                      AllowCustomPaging="True" Skin="Vista">
                        <LayoutTemplate>
                            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton2" runat="server" Height="80px"
                                ImageUrl='<%# Eval("Pic_Path") %>' onclick="ImageButton2_Click" Width="60px" />
                        </ItemTemplate>
                    </telerik:RadListView>

can you help me ??
Maria Ilieva
Telerik team
 answered on 15 Jan 2014
7 answers
203 views
Using this Demo, with a listview nested within another listview, I am attempting to ajaxify the controls with a tabstrip above (Clicking tab buttons refreshes the listview with different data). I've tried and tried, but i cannot get the settings right for ajaxing with an ajax manager. If I place the tapstrip and listviews in an ajax panel, it works perfectly, but I'd prefer not to use an ajax panel (it can reduce performance, correct?).

What is the proper way to ajaxify the tapstrip and listviews with ajax manager?
Maria Ilieva
Telerik team
 answered on 15 Jan 2014
2 answers
79 views
I have problem to hierarchy table  in 4 layer not showing
--
   table1
             table2
                       table3
                                 table4(not showing)

Thank you
Viktor Tachev
Telerik team
 answered on 15 Jan 2014
1 answer
89 views
Hello. I am tring to get a grid to filter based on a drop down selection. I have this working fine, except when the page is loaded from a history point.
Below is one of the columns in the my grid. Note the Java script within the RadScriptBlock5.

 

<telerik:GridTemplateColumn DataField="Sale Price" HeaderText="Price" SortExpression="Sale Price" UniqueName="SalePrice">
   <FilterTemplate>
      <telerik:RadComboBox ID="RadComboBoxSalePrice" runat="server" AppendDataBoundItems="true"
       EnableScreenBoundaryDetection="false" ExpandDirection="Down" DataSourceID="SalePriceDataSource" DataTextField="Sale Price"
       DataValueField="Sale Price Numeric" Height="220px" MarkFirstMatch="true" NoWrap="True"
       OnClientDropDownOpening="OnClientItemsRequestedHandler" OnClientItemsRequested="OnClientItemsRequestedHandler"
       OnClientSelectedIndexChanged="SalePriceIndexChanged"
       SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("SalePrice").CurrentFilterValue%>'
       Sort="Ascending" SortCaseSensitive="False" Width="70px">
        <Items>
           <telerik:RadComboBoxItem Text="All" />
        </Items>
        </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlock5" runat="server">
      <script type="text/javascript">
        function SalePriceIndexChanged(sender, args) {
            var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
            tableView.filter("SalePrice", args.get_item().get_value(), "EqualTo");
        }
       </script>
    </telerik:RadScriptBlock>
    <br />
    <div style="height: 35px; margin-top: 5px;">
       <asp:ImageButton runat="server" ID="btnClear" ImageUrl="~/images/used equipment clear button.gif" OnClick="btnClear_Click" />
    </div>
   </FilterTemplate>
   <ItemTemplate>
    <%# Eval("Price Combo")%>
    </ItemTemplate>
    <ItemStyle HorizontalAlign="Right" Width="70px" />
    <HeaderStyle HorizontalAlign="Right" Width="70px" />
</telerik:GridTemplateColumn>
When the use navigates away from the page, and returns to the page, using the history navigation
I get the following error:

Webpage error details
  
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; xs-ivyEL6bAur8;Cm8Afr; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Tue, 14 Jan 2014 19:35:52 UTC
  
  
Message: 'SalePriceIndexChanged' is undefined
Line: 247648215
Char: 5
Code: 0

This java script is wrapped in RadScriptBlock.

Any ideas how to resolve this?

Lou
Top achievements
Rank 1
 answered on 15 Jan 2014
1 answer
130 views
Good Morning All,

We currently use the GridSettingsPersister class to save the users settings.

I just wanted to ask a quick question as to whether we should be looking to replace that with the Persistence Framework control that is part of the collection.

Basically, are there any benefits for swapping?

Regards, Paul.
Pavlina
Telerik team
 answered on 15 Jan 2014
6 answers
485 views
Hi,

Here is a code snipped from my MasterTableView in my RadGrid.  When I clik on the edit hylperlink, I'd like to hide the txtLastName field and its label, so that noone knows it's there and no editing can happen to that field.  How can I do this in the code behind?

<Columns>    
        <telerik:GridEditCommandColumn UniqueName="editCommand"></telerik:GridEditCommandColumn>    
        <telerik:GridBoundColumn DataField="numPersonnelID" DataType="System.Int32"      
            HeaderText="Personnel ID" ReadOnly="True" SortExpression="numPersonnelID"      
            UniqueName="numPersonnelID" Visible="False">     
        </telerik:GridBoundColumn>    
        <telerik:GridBoundColumn DataField="txtLastName" HeaderText="Last Name"      
            SortExpression="txtLastName" UniqueName="txtLastName" MaxLength="50" Visible="false">     
        </telerik:GridBoundColumn>    
        <telerik:GridBoundColumn DataField="txtFirstName" HeaderText="First Name"      
            SortExpression="txtFirstName" UniqueName="txtFirstName" MaxLength="50">     
        </telerik:GridBoundColumn>    
</Columns> 

Thanks,
Greg


Shinu
Top achievements
Rank 2
 answered on 15 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?