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

Ajax Panel inside RadGrid

4 Answers 90 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andy Spears
Top achievements
Rank 1
Andy Spears asked on 14 Dec 2009, 09:38 PM
I'm using a custom UC inside a RadGrid's EditItemTemplate tag:
<telerik:RadAjaxPanel runat="server"
    <asp:TextBox runat="server" ID="useridTextbox" MaxLength="3" Width="25px"></asp:TextBox> 
    <asp:ImageButton runat="server" ID="checkNameImageButton" ImageAlign="AbsMiddle" ImageUrl="~/Images/checknames.gif" /> 
</telerik:RadAjaxPanel> 

The UC has a button (checkNameImageButton) that does a server-side lookup to verify the entry against Active Directory.  I would like to have it so when the user clicks the checkNameImageButton, only the ajax panel in the UC does a callback.  Currently it appears that the grid is what initiates the callback.  Is it possible to have the Ajax Panel initiate the callback when it is inside a RadGrid?

Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Dec 2009, 04:48 PM
Hi Andy,

I suggest you review the following articles which elaborate on this subject and let me know if they help you to achieve the desired functionality:
RadAjax and WebUserControls
Loading User Controls

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Andy Spears
Top achievements
Rank 1
answered on 15 Dec 2009, 07:48 PM
The RadAjaxManagerProxy seems to be the solution I was looking for, but it's causing a problem.  My UC looks like the following:
<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerProxy1">  
</telerik:RadAjaxManagerProxy> 
 
<asp:TextBox runat="server" ID="useridTextbox" MaxLength="3" Width="25px"></asp:TextBox> 
<asp:ImageButton runat="server" ID="checkNameImageButton" ImageAlign="AbsMiddle" ImageUrl="~/Images/checknames.gif" ToolTip="Verify User ID" OnClick="checkNameImageButton_Click" /> 
&nbsp;&nbsp;<ad:ADViewUser runat="server" ID="ADViewUser1" /> 
The ADViewUser UC contains a single Label, so nothing fancy.  In the Page_Load event, I'm adding the ajax setting:
RadAjaxManagerProxy1.AjaxSettings.AddAjaxSetting( checkNameImageButton, ADViewUser1.DisplayNameLabel ); 
The AjaxManagerProxy is now wrapping a <div> tag around my ADViewUser UC which means the display is now messed up.  The Textbox, ImageButton, and the ADViewUser's Label should all appear on a single line, but with the div wrapping the Label, it is displayed on 2 lines.  Is there anyway around this?
0
Pavlina
Telerik team
answered on 16 Dec 2009, 10:16 AM
Hi Andy ,

To achieve the desired functionality, you should set UpdatePanelsRenderMode property to the RadAjaxManager itself to control the render mode for all ajaxified controls. You can have values Block (the default value) and Inline

For more information, please refer to this help article:
Render modes

Regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Andy Spears
Top achievements
Rank 1
answered on 16 Dec 2009, 04:20 PM
Thanks, that is exactly what I needed.
Tags
Ajax
Asked by
Andy Spears
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Andy Spears
Top achievements
Rank 1
Share this question
or