Regards
Gary

| <asp:Content ID="Content1" ContentPlaceHolderID="MasterContentPlaceHolder" runat="Server"> |
| <script language="javascript" type="text/javascript"> |
| function OnClientFileOpen(oExplorer, args) { |
| var item = args.get_item(); |
| var fileExtension = item.get_extension(); |
| // File is a image document, do not open a new window |
| args.set_cancel(true); |
| // Tell browser to open file directly |
| var requestImage = "FileSystemHandler.ashx?path=" + item.get_url(); |
| document.location = requestImage; |
| //} |
| } |
| function toolbarClicked(toolbar, args) { |
| debugger |
| var buttonValue = args.get_item().get_value(); |
| if (buttonValue == "Archive") |
| DoPostBack(); |
| } |
| function gridContextMenuClicked(toolbar, args) { |
| debugger |
| var buttonValue = args.get_item().get_value(); |
| //var filename = args._targetElement.childNodes[0].nodeValue; |
| //var test = filename; |
| //var buttontext = args.get_node().get_contextMenu().get_selectedValue(); |
| if (buttonValue == "Archive") { |
| DoPostBack(); |
| } |
| //var filelocation = "Z:\testdmsdocs\SharedDocuments" + filename.get_url(); |
| //document.location = filelocation; |
| } |
| function treeContextMenuClicked(toolbar, args) { |
| debugger |
| var buttonValue = args.get_menuItem().get_value(); |
| if (buttonValue == "custom_Menu") |
| DoPostBack(); |
| } |
| function DoPostBack() { |
| __doPostBack('Archive', 'Archive'); |
| } |
| function attachHandlers(explorer, args) { |
| var toolbar = explorer.get_toolbar(); |
| toolbar.add_buttonClicked(toolbarClicked); |
| //support for tree context menu |
| var tree = explorer.get_tree(); |
| tree.add_contextMenuItemClicked(treeContextMenuClicked); |
| //support for grid context menu |
| var gridContextMenu = explorer.get_gridContextMenu(); |
| gridContextMenu.add_itemClicked(gridContextMenuClicked); |
| } |
| function OnClientDelete(oExplorer, args) { |
| var isRoot = isRootDir(oExplorer.get_tree(), args.get_path()); |
| // Check whether the moved item is a directorty and whether it is the root directory; |
| if (args.get_item().isDirectory() && isRoot) { |
| alert("You cannot delete the root directory"); |
| args.set_cancel(true); |
| } |
| } |
| function OnClientMove(oExplorer, args) { |
| var isRoot = isRootDir(oExplorer.get_tree(), args.get_path()); |
| // Check whether the moved item is a directorty and whether it is the root directory; |
| if (args.get_item().isDirectory() && isRoot) { |
| // Check whether this is a renaming ; |
| if (isRenaming(args.get_newPath())) {// The renaming operation ; |
| alert("You cannot rename the root directory"); |
| args.set_cancel(true); |
| } |
| } |
| } |
| function isRootDir(oTree, path) { |
| var dirForDelete = oTree.findNodeByValue(path); |
| if (dirForDelete != null) { |
| return dirForDelete.get_level() == 0; |
| } |
| // Will occurs only when the "path" parameter is not a valid folder path. |
| else return false |
| } |
| function isRenaming(destPath) { |
| if (destPath.search("/\//") == -1) { |
| return true; |
| } |
| else { |
| return false; |
| } |
| } |
| </script> |
| <style type="text/css"> |
| .test_button span span span span |
| { |
| background-image: none !important; |
| padding-left: 2px !important; |
| border: solid 1px grey; |
| } |
| </style> |
| <table width="100%"> |
| <tr> |
| <td> |
| <%-- <div id="eventConsole" style="height: 470px; width: 300px; overflow: auto; display:none;"> |
| </div>--%> |
| <telerik:RadFileExplorer runat="server" ID="DocumentsRadFileExplorer" Width="734px" |
| Height="400px" VisibleControls="All" EnableCreateNewFolder="true" EnableCopy="true" |
| EnableOpenFile="true" OnClientMove="OnClientMove" OnClientDelete="OnClientDelete" |
| OnClientLoad="attachHandlers" |
| OnClientFileOpen="OnClientFileOpen" |
| ongridpopulated="DocumentsRadFileExplorer_GridPopulated"> |
| <Configuration SearchPatterns="*.*" MaxUploadFileSize="10485760"></Configuration> |
| </telerik:RadFileExplorer> |
| </td> |
| </tr> |
| </table> |
| </asp:Content> |
| public static string ArchiveFolder(string path) |
| { |
| string NewFile_Name = ""; |
| string File_Path = ""; |
| Glb_Entities.ExecuteSP(new object[] {"Usp_Dms_ArchiveFile" |
| ,"File_Name", path.Substring( path.LastIndexOf("/")+1) |
| ,"NewFile_Name", NewFile_Name |
| ,"File_Path", File_Path |
| ,"File_ArchivedBy", HttpContext.Current.Session["UserID"].ToString() |
| }); |
| return string.Empty; |
| } |

| <telerik:RadGrid ID="grdProperties" runat="server" GridLines="None" AllowPaging="True" |
| AllowSorting="True" AutoGenerateColumns="False" PageSize="3" OnNeedDataSource="grdProperties_NeedDataSource" |
| OnItemDataBound="grdProperties_ItemDataBound" EnableEmbeddedSkins="false"> |
| <PagerStyle ShowPagerText="false" VerticalAlign="Middle" ForeColor="White" CssClass="ProfilePager_Default" Mode="NextPrevAndNumeric" EnableSEOPaging="True" PrevPageImageUrl="/surf4property/images/btnPrevious.png" NextPageImageUrl="/surf4property/images/btnNext.png"></PagerStyle> |
| <MasterTableView NoMasterRecordsText="No Properties to display"> |
| Number of columns..... |
| </Columns> |
| <RowIndicatorColumn Visible="False"> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn Visible="False" Resizable="False"> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <EditFormSettings> |
| <PopUpSettings ScrollBars="None"></PopUpSettings> |
| </EditFormSettings> |
| </MasterTableView> |
| </telerik:RadGrid> |
function
kontrol() {
alert(
"asd")
var txtmiktar = window["<%= RadNumericTextBox2.ClientID %>"];
var txtyuzde = window["<%= RadNumericTextBox1.ClientID %>"];
if (txtmiktar.GetValue() == '') {
txtmiktar.SetValue(0.00) ;
}
if (txtyuzde.GetValue() == '') {
txtyuzde.SetValue(0.00) ;
}
if (txtyuzde.GetValue() == 0 && txtmiktar.GetValue() == 0) {
alert('
asd');
}
}
And i call it this way: However it throws exception : cs0103 'RadNumericTextBox2' does not exist in the current context
<
telerik:RadNumericTextBox ID="RadNumericTextBox2" Runat="server"
Culture="asd" DbValue='<%# Bind("asd") %>' Type="Currency"
Width="125px" CssClass="label2" MaxValue="1E+16" MinValue="-1E+16" >
<ClientEvents OnKeyPress="kontrol" />
</telerik:RadNumericTextBox>
Thanks...