I would like to use a RadToolTip to add, modify items from a RadGrid.
It works well but when I add to the radtooltip a RequiredFieldValidator and ValidationSummary, the radtooltip doesn't work.
Could you help me ?
Here are the javascript an HTML:
<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function
CloseToolTip()
{
var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
if(tooltip)
{ tooltip.hide(); };
}
function
OkToolTip()
{
CloseToolTip();
ajaxManager.ajaxRequest(
"RT_LOT");
}
</
script>
</
telerik:RadCodeBlock>
<
telerik:RadToolTip ID="RT_LOT" runat="server" HideEvent="FromCode" Modal="True"
Position="Center" RelativeTo="BrowserWindow" ShowCallout="False">
<br />
<table style="border-color: #0000FF; border-width: 10px; width: 100%; text-align: left;">
<tr>
<td><asp:Label ID="RT_LOT_LibLabel" runat="server"></asp:Label></td>
<td><asp:RequiredFieldValidator ID="RT_LOT_RFV" runat="server" Display="Dynamic" ErrorMessage="Erreur"
ControlToValidate="RT_LOT_Lib" SetFocusOnError="True">*</asp:RequiredFieldValidator></td>
<td><asp:TextBox ID="RT_LOT_Lib" runat="server" Width="336px"></asp:TextBox></td>
</tr>
<tr>
<td colspan="3"><asp:ValidationSummary ID="RT_LOT_ValidationSummary" DisplayMode="BulletList" runat="server" /></td>
</tr>
<tr>
<td><input id="RT_LOT_Ok" runat="server" type="button" value="Ok" onclick="OkToolTip();"
style="width: 80px; color: #008000; font-weight: bold;" /></td>
<td></td>
<td><input id="RT_LOT_AnnBt" type="button" value="Annuler" onclick="CloseToolTip();"
style="width: 80px; color: #FF0000; font-weight: bold;" /></td>
</tr>
</table>
</telerik:RadToolTip>
Here is the code behind:
// Ajaxifying
protected
void Page_Load(object sender, EventArgs e)
{
try
{
radAjaxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(manager_AjaxRequest);
radAjaxManager.AjaxSettings.AddAjaxSetting(toolBar, RT_LOT);
}
catch (Exception err)
{...
}
}
// open the RadToolTip from a toolbar:
protected
void toolBar_ButtonClick(object sender, RadToolBarEventArgs e)
{
try
{
switch (e.Item.Value)
{
case @"CRT":
...
RT_LOT.Show();
break;
}
}
catch (Exception err)
{...
}
}
// get the data from the RadToolTip
protected
void manager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
try
{
if (e.Argument == @"RT_LOT")
{
... };
}
catch (Exception err)
{ ...
}
}
Many thanks...
Bernard