This is a migrated thread and some comments may be shown as answers.

Ajaxifying controls dont work

1 Answer 41 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
MIS
Top achievements
Rank 1
MIS asked on 20 Oct 2008, 09:22 PM
Hi:
On my webpage i have 2 grids and one button sitting in a content page. I update grid 1 and grid 2 on button click. I want to be able to make this seamless for the user. Right now, when the grids refresh, there is no loading panel showing up. I have added an Ajax Panel and AjaxManager and both dont seem to help. I have a feeling I am doing something wrong. Can you please look at the code and see hat might be wrong?
thanks
Sid


<

 

asp:Label ID="LblContactID" runat="server" Visible="False"></asp:Label><asp:Label ID="LblError" runat="server"></asp:Label><br />

 

<

 

asp:Panel ID="Panel1" runat="server" Width="100%" GroupingText="Customer Account List">

 

 

<radA:AjaxLoadingPanel ID="AjaxLoadingCustAccts" runat="server" Height="75px" Width="75px">

 

 

<asp:Image ID="Image2" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" />

 

 

</radA:AjaxLoadingPanel>

 

<

 

radG:RadGrid ID="GrdCustomerList" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" Skin="Green" Width="600px" EnableAJAXLoadingTemplate="True" GridLines="None" Title="Available Customer Accounts">

 

 

<MasterTableView DataKeyNames="ID" GridLines="Both" BorderColor="Black" Caption="Available Customer Accounts">

 

 

<Columns>

 

 

<radG:GridButtonColumn ButtonType="PushButton" CommandName="Select" HeaderText="Set Default"

 

 

Text="&gt;&gt;" UniqueName="column" ImageUrl="~/Images/eNora2/SetDefault.gif">

 

 

<HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="True" HorizontalAlign="Center" Width="75px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

</radG:GridButtonColumn>

 

 

<radG:GridBoundColumn DataField="ID" HeaderText="Account GUID" UniqueName="Account GUID" Visible="False">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridTemplateColumn HeaderText="Select" UniqueName="Select">

 

 

<ItemTemplate>

 

 

<asp:CheckBox ID="CbxSelect" runat="server" />

 

 

</ItemTemplate>

 

 

<HeaderStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="True" HorizontalAlign="Center" Width="50px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

<HeaderTemplate>

 

 

<strong><span style="font-size: 10pt; font-family: Arial">Select<br />

 

 

</span></strong>

 

 

<input id="btnCheckAll" style="width: 74px; height: 23px" type="button" value="Select All" language="javascript" onclick="return btnCheckAll_onclick()" />

 

 

</HeaderTemplate>

 

 

</radG:GridTemplateColumn>

 

 

<radG:GridBoundColumn HeaderText="Account Name" UniqueName="Branch" DataField="Branch">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="150px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Division" UniqueName="CBU" DataField="CBU">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="75px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Brand" UniqueName="Brand" DataField="Brand">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="75px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="City" UniqueName="City" DataField="City">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="75px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="State" UniqueName="State" DataField="State">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="60px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" Width="30px" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="Zip" HeaderText="Zip" UniqueName="Zip">

 

 

<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Width="75px" Wrap="True" />

 

 

<ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

Font-Underline="False" HorizontalAlign="Center" Wrap="True" Width="40px" />

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="BrandId" HeaderText="BrandID" UniqueName="BrandId" Visible="False">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="CbuId" HeaderText="CbuId" UniqueName="CbuId" Visible="False">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn DataField="BranchId" HeaderText="BranchId" UniqueName="BranchId" Visible="False">

 

 

</radG:GridBoundColumn>

 

 

</Columns>

 

 

<ExpandCollapseColumn Visible="False">

 

 

<HeaderStyle Width="19px" />

 

 

</ExpandCollapseColumn>

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

</MasterTableView>

 

 

<SelectedItemStyle BackColor="DarkGray" BorderStyle="Ridge" BorderWidth="1px" ForeColor="Red" Font-Bold="True" />

 

 

<PagerStyle ForeColor="White" />

 

</

 

radG:RadGrid></asp:Panel>

 

 

<asp:Button ID="BtnAddSelected" runat="server" Text="Add Selected Accounts" /><br />

 

<

 

asp:Panel ID="Panel2" runat="server" Width="100%" GroupingText="Selected Account List"><table Width="600">

 

 

<tr>

 

 

<td style="height: 21px; text-align: right" colspan="5">

 

User Accounts Per Page:

<asp:DropDownList ID="ddlAccountCount" runat="server" AutoPostBack="True">

 

 

<asp:ListItem>10</asp:ListItem>

 

 

<asp:ListItem Selected="True">25</asp:ListItem>

 

 

<asp:ListItem>50</asp:ListItem>

 

 

<asp:ListItem>100</asp:ListItem>

 

 

<asp:ListItem>All</asp:ListItem>

 

 

</asp:DropDownList></td>

 

 

</tr>

 

</

 

table>

 

 

<radA:AjaxLoadingPanel ID="AjaxLoadingSelectedAccts" runat="server" Height="75px"

 

 

Width="75px">

 

 

<asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/Ajax/Skins/Default/Loading.gif" />

 

 

</radA:AjaxLoadingPanel>

 

<

 

radG:RadGrid ID="GrdSelectedCustomers" runat="server" AutoGenerateColumns="False"

 

 

Description="Selected Customer Accounts" Title="Selected Customer Accounts" Width="600px" EnableAJAX="True" GridLines="None" AllowPaging="True" EnableAJAXLoadingTemplate="True" Skin="Green">

 

 

<MasterTableView Caption="Selected Customer Account" DataKeyNames="ID">

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Visible="False">

 

 

<HeaderStyle Width="19px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<radG:GridButtonColumn ButtonType="PushButton" CommandName="Select" HeaderText="Set Default"

 

 

Text=" &gt;&gt; " UniqueName="column">

 

 

</radG:GridButtonColumn>

 

 

<radG:GridBoundColumn HeaderText="Account GUID" UniqueName="Account GUID" DataField="ID" Visible="False">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Account Name" UniqueName="column" DataField="Branch">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Division" UniqueName="column" DataField="CBU">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Brand" UniqueName="column" DataField="Brand">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="City" UniqueName="column" DataField="City">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="State" UniqueName="column" DataField="State">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridBoundColumn HeaderText="Zip" UniqueName="column" DataField="Zip">

 

 

</radG:GridBoundColumn>

 

 

<radG:GridButtonColumn ButtonType="PushButton" CommandName="Delete" HeaderText="Remove"

 

 

Text=" X " UniqueName="column">

 

 

</radG:GridButtonColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

</

 

radG:RadGrid></asp:Panel>

 

<

 

radA:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<radA:AjaxSetting AjaxControlID="BtnAddSelected">

 

 

<UpdatedControls>

 

 

<radA:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="AjaxLoadingCustAccts" />

 

 

<radA:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="AjaxLoadingSelectedAccts" />

 

 

</UpdatedControls>

 

 

</radA:AjaxSetting>

 

 

</AjaxSettings>

 

</

 

radA:RadAjaxManager>

 

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 21 Oct 2008, 08:20 AM
Hi Sid,

I followed your scenario but could not replicate the issue. Please find attached a sample and let me know how it works on your end and if I missed something from your logic.

Greetings,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
MIS
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or