| <%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestFile.aspx.vb" Inherits="TestFile" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" > |
| <head runat="server"> |
| <title>Untitled Page</title> |
| </head> |
| <body style="margin: 0px; |
| padding: 0px; |
| min-height: 100% !important; /*For all browser except IE */ |
| height: auto !important; |
| height: 100%; /*IE hack since IE doesn't understand min-height */ |
| background-position: center top; |
| width: 100%; |
| position: absolute; |
| top: 0px; |
| left: 0px; |
| background-image: url('./Images/background.gif'); |
| background-repeat: repeat-y;"> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <div id="DivGlobal" style="padding: 0px; |
| width: 990px; |
| margin: 0px auto 0px auto; |
| position: relative; |
| background-color: #F9F9F9; |
| min-height: 100% !important; /*For all browser except IE */ |
| height: auto !important; |
| height: 100%; /*IE hack since IE doesn't understand min-height */ " > |
| <div style="width: 690px; |
| min-height: 100% !important; /*For all browser except IE */ |
| height: auto !important; |
| height: 100%; /*IE hack since IE doesn't understand min-height */ |
| position: relative; |
| float: left; |
| padding: 0px; |
| margin: 0px;"> |
| <div id="DivContent" style="padding: 0px; |
| margin: 0px; |
| width: 690px; |
| min-height: 100% !important; /*For all browser except IE */ |
| height: auto !important; |
| height: 100%; /*IE hack since IE doesn't understand min-height */ |
| background-color: #F9F9F9; |
| float: left;" > |
| <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> |
| <script type="text/javascript"> |
| function ShowDock5() { |
| var dock = $find("<%=RadDock5.ClientID%>"); |
| var dockStyle = document.getElementById("<%= RadDock5.ClientID %>"); |
| dock.set_height(100); |
| dock.set_width(100); |
| dockStyle.style.left = 1 + "px"; |
| dockStyle.style.top = 1 + "px"; |
| dock.get_element().style.zIndex = 1999; |
| dock.set_closed(false); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
| </telerik:RadWindowManager> |
| <div style="background-color: #FFFFFF; |
| float: left; |
| min-height: 100% !important; /*For all browser except IE */ |
| height: auto !important; |
| height: 100%; /*IE hack since IE doesn't understand min-height */ |
| position: relative; |
| width: 825px; |
| padding: 0px; |
| margin: 0px;"> |
| <telerik:RadDock ID="RadDock5" runat="server" AutoPostBack="false" Resizable="true" CloseText="Fermer" |
| DockMode="Floating" DefaultCommands="Close" Height="1px" Width="1px" Top="1px" Left="1px" > |
| <ContentTemplate> |
| <asp:Image ID="Image3" runat="server" /> |
| </ContentTemplate> |
| </telerik:RadDock> |
| <div id="imagePreviewPanel" style="display: block;"> |
| <asp:ImageButton ID="imagePreview" runat="server" ImageUrl="../../Images/Contenu/imagegallery/spacer.gif" Height="192px" |
| Width="272px" AlternateText="Photo" BorderWidth="0" |
| OnClientClick="ShowDock5(); return false;" |
| /> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </form> |
| </body> |
| </html> |
| Imports System |
| Imports System.Net |
| Partial Class TestFile |
| Inherits System.Web.UI.Page |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| RadDock5.Closed = True |
| End Sub |
| End Class |
<telerik:GridButtonColumn CommandName="ReadColumn" UniqueName="CHECK_JOB_ID" DataTextField="CHECK_JOB_ID" ButtonType="LinkButton" HeaderText="ID" SortExpression = "CHECK_JOB_ID"></telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="CUSTOMS_CODE" HeaderText="CODE" SortExpression="CUSTOMS_CODE" UniqueName="CUSTOMS_CODE" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="INPUT_DATE" DataFormatString="{0:d}" HeaderText="DATE" SortExpression="INPUT_DATE" UniqueName="INPUT_DATE" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn>
<telerik:GridButtonColumn UniqueName="Edit" CommandName="EditColumn" Text="edit" ButtonType="LinkButton" HeaderText=" edit "></telerik:GridButtonColumn>
<telerik:GridButtonColumn ConfirmText="Are You Sure?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="Delete" HeaderText="delete" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
<ItemStyle HorizontalAlign="Center" />
</telerik:GridButtonColumn>
</Columns>
aspx.cs:
protected void rgClassTreat_ItemCommand(object source, GridCommandEventArgs e)
{
CheckClassTreatController controller = new CheckClassTreatController();
CheckClassTreatInfo info = new CheckClassTreatInfo() ;
if (e.CommandName == "EditColumn")
{
GridEditableItem item = (GridEditableItem)e.Item;
string documentID = item.GetDataKeyValue("DOCUMENT_ID").ToString();
info = controller.GetCheckClassTreatByDocumentID(documentID);
string url = "window.showModalDialog('CheckClassTreatInput.aspx?DocumentID=" + documentID + "&TreatClass=" + info.TreatClass + "', 'new', 'status:no;dialogWidth:800px;dialogHeight:600px;resizable:no');window.location.reload();";
pnlInput.ResponseScripts.Add(url);
}
else if (e.CommandName == "ReadColumn")
{
GridEditableItem item = (GridEditableItem)e.Item;
string documentID = item.GetDataKeyValue("DOCUMENT_ID").ToString();
info = controller.GetCheckClassTreatByDocumentID(documentID);
string url = "window.showModalDialog('CheckClassTreatInput.aspx?DocumentID=" + documentID + "&TreatClass=" + info.TreatClass + "&ReadOnly=" + "', 'new', 'status:no;dialogWidth:800px;dialogHeight:600px;resizable:no');";
pnlInput.ResponseScripts.Add(url);
}
}
protected void btnToExcel_Click(object sender, EventArgs e)
{
rgClassTreat.ExportSettings.ExportOnlyData = true;
rgClassTreat.ExportSettings.IgnorePaging = true;
rgClassTreat.ExportSettings.OpenInNewWindow = true;
rgClassTreat.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML;
rgClassTreat.MasterTableView.ExportToExcel();
}
Hi,
I have a situation where I have One control that is used to enter Exercise Equipment, it is called the Equipment Maint. This EquipmentMaint has two child controls (programs). One allows you to enter the
type of equipment, the other child control allows you to enter the location of the equipment.
Each child control program uses a RadToolTip to accept the name of the type or name of the location. I am trying to use a
asp:RequiredFieldValidator in each child control program to make sure there is a name entered.
When I click on the "Add new Location", the RadToolTip appears that allows me to enter the location name. The problem is that even though I enter the location name, the RadToolTip stays on the screen. I found out that this happens because even though the Type name RadToolTip has not been called yet, the
asp:RequiredFieldValidator placed in both control programs requires both controls to have thier particular name field populated. In other words, even though the Location program RadToolTip name field is populated, its RadToopTip will not go away until the type name is populated, and, even though the type location program RadToolTip name field is populated, its RadToopTip will not go away until the location name is populated
I read this ....
6. RequiredFieldValidator inside the RadToolTip
When you use a RequiredFieldValidator inside a RadToolTip you add the RequiredFieldValidator to the page, not only to the displayed in the tooltip part of it. After that, when you click any of your page’s elements which cause validation, those trigger the check of the validator, which fails even if the content of the tooltip is invisible. That is why, in such scenarios you have to set the CausesValidation property to false for all elements on the page that do not require it.
So, I guess my question is obvious - how do I handle validation in this scenario.
Is there a telerik efficient way to do this ?
thanks