Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
183 views
Hi Telerik Team,

I am trying to clear all the file inputs(all files that are uploaded) that are uploaded for RadAsync Upload control on Button click event,

My button click code is as follows:
<asp:Button ID="btnTest" runat="server" OnClientClick="return resetBatch();" Text="Reset Batch"/> 

my javascript code is as follows:

 function resetBatch() {
        var upload = $find("<%= radBatchAttachment.ClientID %>");
      var inputs = upload.getUploadedFiles();
      for (i = inputs.length - 1; i >= 0; i--) {
          upload.deleteFileInputAt(i);
      }
        return false;
    }

But I am getting a error at line "var inputs = upload.getUploadedFiles();", Please find the error image in attachment "Error.png",
and RadAsyncUpload control is not clearing the files uploaded.

when I use the following approach using the function as follows:

function resetBatch() {
       debugger;
       var upload = $find("<%= radBatchAttachment.ClientID %>");
       var count = upload._uploadedFiles.length;
       for (var i = 0; i <= (count - 1); i++) {
           upload.deleteFileInputAt(i);
       }      
       return false;
   } 

 I am getting the following error:

 that is present in attachment "ResetRadAsyncUpload.png"
Please help me in doing this. I am in big need of this.

Thanks & Regards

--------------------------------------------------------

Aravinda Chary N

Ph: 9700308156

www.manamai.com



  
Bozhidar
Telerik team
 answered on 16 Mar 2012
1 answer
82 views
Hi,

I am using grid which has scroll.And according to scrolling grid data is loaded.
Scrolling grid is embeded in RadWindow,and that radwindow is open when click on link buttton.
Now I have problem when I scolling down the grid,at that time grid ID is not found for loading more records,
Below is my code;

<%

 

@ Page Language="C#" AutoEventWireup="true" CodeFile="Up1frmIRPage.aspx.cs" Inherits="Dummy"%>

 

<%

 

@ Register TagPrefix="Acme" Namespace="Acme" Assembly="App_Web_mytestuc.ascx.cdcab7d2" %>

 

<%

 

@ Register Assembly="ContainerControl" Namespace="Tittle.Controls" TagPrefix="Tittle" %>

 

<%

 

@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

 

<!

 

 

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>Home</title>

 

 

 

<link href="/css/DMStyleSheet.css" type="text/css" rel="Stylesheet" />

 

 

 

<link href="/css/style.css" type="text/css" rel="Stylesheet" />

 

 

 

<script src="JQuary/jquery.js" type="text/javascript"></script>

 

 

 

<script src="JQuary/progress.js" type="text/javascript"></script>

 

 

 

<script src="Javascript/Leftpan.js" type="text/javascript"></script>

 

 

 

<link rel="stylesheet" href="Styles/demo/base/jquery.ui.all.css" type="text/css" />

 

 

 

<script src="JQuary/jquery-1.7.1.js" type="text/javascript"></script>

 

 

 

<script src="JQuary/ui/jquery.ui.core.js" type="text/javascript"></script>

 

 

 

<script src="JQuary/ui/jquery.ui.widget.js" type="text/javascript"></script>

 

 

 

<script src="JQuary/ui/jquery.ui.accordion.js" type="text/javascript"></script>

 

 

 

<link rel="stylesheet" href="Styles/demo/demos.css" type="text/javascript" />

 

 

 

<link href="Styles/demo/base/jquery.ui.theme.css" rel="stylesheet" type="text/css" />

 

 

 

<link href="css/Grid.MyCustomSkin.css" rel="stylesheet" type="text/css" />

 

 

<%

 

--ForPopUp--%>

 

<%

 

-- <link href="css/POPUP/jquery.ui.all.css" rel="stylesheet" type="text/css" />

 

<script src="JQuary/POPUP/external/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.effects.core.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.button.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.core.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.dialog.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.draggable.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.mouse.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.position.js" type="text/javascript"></script>

<script src="JQuary/POPUP/ui/jquery.ui.resizable.js" type="text/javascript"></script>--

 

 

%>

 

<%

 

-- <script src="JQuary/POPUP/ui/jquery.ui.widget.js" type="text/javascript"></script>--%>

 

 

 

 

 

<script type="text/javascript">

 

$(

 

function () {

 

$(

 

"#accordion").accordion({

 

collapsible:

 

true

 

});

});

// For POP UP

// $(function () {

// // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!

// $("#dialog:ui-dialog").dialog("destroy");

// var name = $("#name"),

// email = $("#email"),

// password = $("#password"),

// allFields = $([]).add(name).add(email).add(password),

// tips = $(".validateTips");

// function updateTips(t) {

// tips

// .text(t)

// .addClass("ui-state-highlight");

// setTimeout(function () {

// tips.removeClass("ui-state-highlight", 1500);

// }, 500);

// }

// function checkLength(o, n, min, max) {

// if (o.val().length > max || o.val().length < min) {

// o.addClass("ui-state-error");

// updateTips("Length of " + n + " must be between " +

// min + " and " + max + ".");

// return false;

// } else {

// return true;

// }

// }

// function checkRegexp(o, regexp, n) {

// if (!(regexp.test(o.val()))) {

// o.addClass("ui-state-error");

// updateTips(n);

// return false;

// } else {

// return true;

// }

// }

// $("#dialog-form").dialog({

// autoOpen: false,

// height: 300,

// width: 350,

// modal: true,

// buttons: {

// "Create an account": function () {

// var bValid = true;

// allFields.removeClass("ui-state-error");

// bValid = bValid && checkLength(name, "username", 3, 16);

// bValid = bValid && checkLength(email, "email", 6, 80);

// bValid = bValid && checkLength(password, "password", 5, 16);

 

 

//bValid = bValid && checkRegexp(name, /^[a-z]([0-9a-z_])+$/i, "Username may consist of a-z, 0-9, underscores, begin with a letter.");

 

 

 

// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/

 

 

 

//bValid = bValid && checkRegexp(email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com");

 

 

 

//bValid = bValid && checkRegexp(password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9");

 

// if (bValid) {

// $("#users tbody").append("<tr>" +

// "<td>" + name.val() + "</td>" +

// "<td>" + email.val() + "</td>" +

// "<td>" + password.val() + "</td>" +

// "</tr>");

// $(this).dialog("close");

// }

// },

// Cancel: function () {

// $(this).dialog("close");

// }

// },

// close: function () {

// allFields.val("").removeClass("ui-state-error");

// }

// });

// $("#create-user")

// .button()

// .click(function () {

// $("#dialog-form").dialog("open");

// });

// });

 

 

 

 

 

</script>

 

 

 

<style type="text/css">

 

 

 

.style1

 

{

 

 

width: 47%;

 

}

 

 

 

.RadPanelBar .rpImage

 

{

 

 

height: 19px;

 

}

 

 

.RadPanelBar .rpLevel1 .rpImage

 

{

 

 

height: 16px;

 

}

 

 

 

 

</style>

 

 

 

<script type="text/javascript">

 

 

 

 

 

 

function funSetWidthHeight(id, id2, id3, idV,Img4,RadGrid22,iWidth, iHeight) {

 

 

 

//debugger;

 

 

 

var myWidth = 0;

 

 

 

var myHeight = 0;

 

 

 

if (typeof (window.innerWidth) == 'number') {

 

 

 

//Non-IE

 

myWidth = window.innerWidth;

myHeight = window.innerHeight;

}

 

 

if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {

 

 

 

//IE 6+ in 'standards compliant mode'

 

myWidth = document.documentElement.clientWidth;

myHeight = document.documentElement.clientHeight;

}

 

 

else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {

 

 

 

//IE 4 compatible

 

myWidth = document.body.clientWidth;

myHeight = document.body.clientHeight;

}

 

 

if (myWidth != 0) {

 

myWidth = document.documentElement.clientWidth;

myHeight = document.documentElement.clientHeight;

}

 

 

if (myWidth != 0) {

 

 

 

var vWidth = myWidth - iWidth;

 

 

 

var vHeight = myHeight - iHeight;

 

 

 

if (vWidth < 150)

 

vWidth = 150;

 

 

if (vHeight < 165)

 

vHeight = 165;

 

 

//debugger;

 

 

 

//var tbW=vWidth*(15/100);

 

document.getElementById(id).style.width = vWidth +

 

'px';

 

document.getElementById(id2).style.width = vWidth +

 

'px';

 

document.getElementById(id3).style.width = vWidth +

 

'px';

 

document.getElementById(idV).style.width = vWidth +

 

'px';

 

 

 

//document.getElementById(Img4).style.width = vWidth +'px';

 

 

 

//debugger;

 

 

 

var width = vWidth * (20 / 100);

 

 

 

//var upDatedWidht = vWidth - width;

 

 

 

var upDatedWidht = vWidth - 182;

 

 

 

 

if (navigator.userAgent.toLowerCase().match('chrome'))

 

{

upDatedWidht = vWidth - 200;

document.getElementById(RadGrid22).style.width = upDatedWidht +

 

'px';

 

document.getElementById(

 

"RadGrid3").style.width = upDatedWidht + 'px';

 

document.getElementById(

 

"RadGrid4").style.width = upDatedWidht + 'px';

 

}

 

 

else

 

{

document.getElementById(RadGrid22).style.width = upDatedWidht +

 

'px';

 

document.getElementById(

 

"RadGrid3").style.width = upDatedWidht + 'px';

 

document.getElementById(

 

"RadGrid4").style.width = upDatedWidht + 'px';

 

 

}

 

document.getElementById(

 

"mainbody").style.width = vWidth + 'px';

 

 

}

}

 

 

//debugger;

 

window.onresize = ControlResize;

 

 

 

function ControlResize()

 

{

funSetWidthHeight(

 

'div1', 'tb1', 'tb2', 'tb3', 'Img4', 'RadGrid4', 20, 20);

 

}

 

 

 

</script>

 

 

</

 

 

head>

 

<

 

 

body id="mainbody" onload="funSetWidthHeight('div1', 'tb1', 'tb2', 'tb3','Img4','RadGrid1',20, 20);" style="border:1px solid blue;min-width:900px;" > <%--style="border:1px solid blue;width:auto"--%>

 

 

 

<form id="form1" runat="server">

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

<script type="text/javascript">

 

<!--

 

 

function RadScrollingGridWidth(e) {

 

 

 

var grid = $find("<%=RadGrid2.ClientID %>");

 

 

 

var scrollArea = document.getElementById("<%= RadGrid2.ClientID %>" + "_GridData");

 

 

 

if (IsScrolledToBottom(scrollArea)) {

 

}

}

 

 

function RadScrollingGridWidth1(e) {

 

 

 

var grid = $find("<%=RadGrid2.ClientID %>");

 

 

 

var scrollArea = document.getElementById("<%= RadGrid3.ClientID %>" + "_GridData");

 

 

 

if (IsScrolledToBottom(scrollArea)) {

 

}

}

 

 

function RadScrollingGridWidth2(e) {

 

 

 

var grid = $find("<%=RadGrid4.ClientID %>");

 

 

 

var scrollArea = document.getElementById("<%= RadGrid4.ClientID %>" + "_GridData");

 

 

 

if (IsScrolledToBottom(scrollArea)) {

 

}

}

 

 

function HandleScrolling(e) {

 

 

 

var grid = $find("<%=RadGrid2.ClientID %>");

 

 

 

var scrollArea = document.getElementById("<%= RadGrid2.ClientID %>" + "_GridData");

 

 

 

if (IsScrolledToBottom(scrollArea)) {

 

 

 

var currentlyDisplayedRecords = grid.get_masterTableView().get_pageSize() * (grid.get_masterTableView().get_currentPageIndex() + 1);

 

 

 

//if the presently visible items are less than the entire source records count

 

 

 

//trigger an ajax request to increase them

 

 

 

if (currentlyDisplayedRecords < 100) {

 

$find(

 

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords");

 

}

}

}

 

 

//this method calculates whether you have reached the bottom when dragging the vertical grid scroll

 

 

 

function IsScrolledToBottom(scrollArea) {

 

 

 

var currentPosition = scrollArea.scrollTop + scrollArea.clientHeight;

 

 

 

return currentPosition == scrollArea.scrollHeight;

 

}

 

window.onresize = RadScrollingGridWidth;

window.onresize = RadScrollingGridWidth1;

window.onresize = RadScrollingGridWidth2;

window.open= RadScrollingGridWidth;

window.open=RadScrollingGridWidth1;

window.open = RadScrollingGridWidth2;

 

 

-->

 

 

 

 

</script>

 

</

 

 

telerik:RadCodeBlock>

 

<

 

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel2" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1"/>

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="radwindowPopup" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

 

</AjaxSettings>

 

</

 

 

telerik:RadAjaxManager>

 

 

 

 

 

 

 

<div id="div1" runat="server" style="width:985px;">

 

 

 

<table id="tb1" runat="server" style="width: 985px; height: 50px;min-width:900px;cellspacing:0px">

 

 

 

<tr>

 

 

 

<td align="left" style="width:100%; height: 8%; background-image: url('images/DM-bar.jpg');

 

 

 

 

background-repeat: repeat-x;vertical-align:top">

 

<%

 

--<img id="Img4" runat="server" src="Images/IAC_Logo.jpg" alt="Logo" />--%>

 

 

 

<asp:Image ID="Img4" runat="server" ImageUrl="Images/IAC_Logo.jpg" AlternateText="Logo" Width="100%" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<table id="tb2" runat="server" style="width: 985px; height: 1500px;background-color:White;min-width:900px;cellspacing:0px"> <%--background-color: Aqua--%>

 

 

 

<tr>

 

 

 

<td id="sbCont" style="width: 15%; height: 100%; font-size: 7pt;background-color:White;

 

 

 

 

color: #000000; vertical-align: top"> <%--background-color: Yellow;--%>

 

 

 

<table style="width: 100%; height: 100%;background-color:White"> <%--background-color: Red--%>

 

 

 

<tr valign="top" style="vertical-align: top">

 

 

 

<td valign="top" style="width: 100%; height:80%">

 

 

 

 

<div class="demo">

 

 

 

<div id="accordion">

 

 

 

<h3 style="background-color: #3090C7;">

 

 

 

<a style="white-space:nowrap;color:white;font-size:1.1em" href="#" >Services</a></h3>

 

 

 

<div>

 

 

 

<p>

 

 

 

<asp:HyperLink ID="lnkDocumentManager" style="white-space:nowrap" runat="server" Font-Underline="false" Text="File Manager" Target="_blank"/>

 

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">My Reports</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Reports

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">Historic Models</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Section 33

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">Manaege Data</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Section 44

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">View Historic Data</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Section 44

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">Analyst capture</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Section 44

 

 

</p>

 

 

 

</div>

 

 

 

<h3 style="background-color: #3090C7">

 

 

 

<a href="#" style="white-space:nowrap;;color:white;font-size:1.1em">Feedback</a></h3>

 

 

 

<div>

 

 

 

<p style="white-space:nowrap">

 

Section 44

 

 

</p>

 

 

 

</div>

 

 

 

</div>

 

 

 

</div>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr valign="bottom">

 

 

 

<td valign="bottom" style="width: 100%; height: 15%">

 

 

 

<table style="width: 100%; background-color: White">

 

 

 

<tbody>

 

 

 

<tr style="vertical-align: bottom">

 

<%

 

--<td>

 

<img alt="" src="Images/topLeft.gif" width="1%" height="1"/>

</td>--

 

 

%>

 

 

 

<td style="width: 100%;">

 

 

 

<img alt="" src="Images/DM-bar.jpg" width="33%" height="1" />

 

 

 

<img alt="" id="Img1" width="30" height="8" onclick="leftRoeHide(this);" src="Images/vertical1_arrow.jpg"

 

 

 

style="cursor: pointer; height: 8px;" />

 

 

 

<img alt="" src="Images/DM-bar.jpg" width="33%" height="1" />

 

 

 

</td>

 

<%

 

-- <td>

 

<img alt="" src="Images/topRight.gif" height="1" width="1%"/>

</td>--

 

 

%>

 

 

 

</tr>

 

 

 

<tr id="leftRoeHide" style="vertical-align: bottom; background-color: white; font-size: 7pt;

 

 

 

 

color: #000000;" valign="bottom">

 

 

 

<td style="width: 100%; padding-left: 10px" valign="baseline" >

 

 

 

<table style="width: 100%; height: 100%; vertical-align: bottom;">

 

 

 

<tbody>

 

 

 

<tr>

 

 

 

<td style="width: 80%">

 

 

 

<asp:LinkButton ID="lnkUtilities" runat="server" Font-Size="Small" ForeColor="#668fa3" Font-Names="Verdana" Text="Utilities"></asp:LinkButton>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</tbody>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</tbody>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</td>

 

 

 

<td valign="top" style="width: 1%; height: 100%; background-repeat: repeat-y;background-position: center;background-color: #e7ebf0;">

 

 

 

<img alt="" src="Images/DM-bar.jpg" width="1px" height="100%" />

 

<%

 

--<img alt="" id="outlookside" height="60" onclick="lefthide(this);" src="Images/left_arrow.jpg"

 

style="cursor: pointer" width="10" /> --

 

 

%>

 

<%

 

--<img alt="" src="Images/DM-bar.jpg" width="1px" height="51%" />--%>

 

 

 

</td>

 

 

 

<td id="sbContainer" style="height: 100%; background-color: White"> <%--width: 79%;--%>

 

 

 

<table style="width: 100%; height: 100%; background-color: White">

 

 

 

<tr valign="top" style="vertical-align: top">

 

 

 

<td align="right">

 

 

 

<asp:Label ID="Label1" runat="server" Text="Login as " Font-Names="Calibri" Font-Size="Small"></asp:Label>&nbsp;|&nbsp;

 

 

 

<asp:LinkButton ID="LinkButton1" runat="server" Font-Names="Calibri" Font-Size="Small" CausesValidation="False"

 

 

 

ForeColor="#668fa3">Sign Out</asp:LinkButton>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr valign="top" style="height: 100%; vertical-align: top">

 

 

 

<td>

 

 

 

<table style="width: 100%; background-color: White">

 

 

 

<tbody>

 

 

 

<tr style="vertical-align:top">

 

 

 

<td style="width: 100%;height:100%" valign="top">

 

 

 

<table style="width: 100%; background-color: White">

 

 

 

<tbody>

 

 

 

<tr > <%--style="height:100%"--%>

 

 

 

<td style="width: 70%;" valign="top" align="center" >

 

 

 

<Tittle:PanelCurveControl ID='tblCrvPnl' runat="server" Expandable="true" Margin="10" Title="Approve Historical Details" TabBackColor="#3090C7" HasPrint="false">

 

 

 

<telerik:RadGrid ID="RadGrid1" AllowSorting="True" runat="server" AllowPaging="true"

 

 

 

PageSize="5" GridLines="Both" Skin="MyCustomSkin" EnableEmbeddedSkins="false"

 

 

 

Width="100%" Height="138px">

 

 

 

<PagerStyle Visible="false" />

 

 

 

<MasterTableView TableLayout="Fixed" />

 

 

 

<ClientSettings> <%--EnableRowHoverStyle="true"--%>

 

<%

 

-- <Selecting AllowRowSelect="true" />--%>

 

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />

 

 

 

</ClientSettings>

 

 

 

<SelectedItemStyle CssClass="SelectedItem" />

 

 

 

</telerik:RadGrid>

 

 

 

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" >

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

<br />

 

<%

 

--<asp:Button ID="btnOpenPopup" runat="server" Text="Click here for more records..." ForeColor="#444" Font-Names="Calibri" Font-Size="Small" OnClick="btnOpenPopup_Click" />--%>

 

 

 

<asp:LinkButton ID="btnOpenPopup" runat="server" Text="Click here for more records..." ForeColor="#444" Font-Names="Calibri" Font-Size="Small" OnClick="btnOpenPopup_Click" ></asp:LinkButton>

 

 

 

<telerik:RadWindow ID="radwindowPopup" runat="server" VisibleOnPageLoad="false" Height="500px"

 

 

 

Width="800px" Modal="true" BackColor="#DADADA" VisibleStatusbar="false" Behaviors="None"

 

 

 

Title="Unsaved changes pending">

 

 

 

<ContentTemplate>

 

 

 

<div style="padding: 20px">

 

 

 

<telerik:RadGrid ID="RadGrid2" AllowSorting="True" runat="server" AllowPaging="true"

 

 

 

PageSize="15" GridLines="Both" Skin="MyCustomSkin" EnableEmbeddedSkins="false"

 

 

 

Width="100%" >

 

 

 

<PagerStyle Visible="false" />

 

 

 

<MasterTableView TableLayout="Fixed" />

 

 

 

<ClientSettings>

 

 

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />

 

 

 

<ClientEvents OnScroll="HandleScrolling" />

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

 

 

<asp:Button ID="btnOk" runat="server" Text="Yes" Width="50px" OnClick="btnOk_Click" />

 

 

 

&nbsp;&nbsp;&nbsp;

 

 

 

<asp:Button ID="btnCancel" runat="server" ForeColor="#444" Text="No" Width="50px" OnClick="btnCancel_Click" />

 

 

 

</div>

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadWindow>

 

 

 

</Tittle:PanelCurveControl>

 

 

 

<br />

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr style="height:100%">

 

 

 

<td style="width: 70%;" valign="top">

 

 

 

<Tittle:PanelCurveControl ID='PanelCurveControl2' runat="server" Expandable="true" Margin="10" Title="Pending Confirmation Details" TabBackColor="#3090C7" HasPrint="false">

 

 

 

<telerik:RadGrid ID="RadGrid3" AllowSorting="True" runat="server" AllowPaging="true"

 

 

 

PageSize="5" GridLines="Both" Skin="MyCustomSkin" EnableEmbeddedSkins="false" Width="100%" Height="85px">

 

 

 

<PagerStyle Visible="false" />

 

 

 

<MasterTableView TableLayout="Fixed" />

 

 

 

<ClientSettings>

 

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />

 

<%

 

-- <ClientEvents OnScroll="HandleScrolling1" />--%>

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" >

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

</Tittle:PanelCurveControl>

 

 

 

<br />

 

 

 

</td>

 

 

 

</tr>

 

 

 

 

<tr style="height:100%">

 

 

 

<td style="width: 70%">

 

 

 

<Tittle:PanelCurveControl ID='PanelCurveControl1' runat="server" Expandable="true" Margin="10" Title="IR Users Login History (Last 7 days)" TabBackColor="#3090C7" HasPrint="false">

 

 

 

 

<telerik:RadGrid ID="RadGrid4" AllowSorting="True" runat="server" AllowPaging="true"

 

 

 

PageSize="5" GridLines="Both" Skin="MyCustomSkin" EnableEmbeddedSkins="false" Width="100%" Height="85px">

 

 

 

<PagerStyle Visible="false" />

 

 

 

<MasterTableView TableLayout="Fixed" />

 

 

 

<ClientSettings>

 

 

 

<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" FrozenColumnsCount="2"/>

 

<%

 

-- <ClientEvents OnScroll="HandleScrolling2" />--%>

 

 

 

</ClientSettings>

 

 

 

</telerik:RadGrid>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" > <%--Skin="Default"--%>

 

<%

 

--<asp:Image ID="Image3" runat="server" ImageUrl="~/Images/Imgloading.gif"></asp:Image>--%>

 

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

</Tittle:PanelCurveControl>

 

 

 

<br />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</tbody>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</tbody>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr valign="bottom" style="height: 100%; vertical-align: bottom">

 

 

 

<td valign="bottom">

 

 

 

<table style="width: 100%; height: 100%; vertical-align: bottom">

 

 

 

<tr style="vertical-align: bottom">

 

 

 

<td style="width: 100%; background-repeat: repeat-x; background-position: center;

 

 

 

 

background-color: #e7ebf0;" align="center">

 

 

 

<img alt="" id="Img2" width="60" height="10" onclick="MiddleRowHide(this);" src="Images/vertical1_arrow.jpg"

 

 

 

style="cursor: pointer" />

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr style="height: 20px; vertical-align: bottom">

 

 

 

<td style="width: 100%; background-image: url(Images/DM-bar.jpg); background-repeat: repeat-x;

 

 

 

 

background-position: center; background-color: #e7ebf0;" align="center">

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr id="MiddleRowHide" style="background-color: white; font-size: 7pt; color: #000000;

 

 

 

 

vertical-align: bottom; height: 100%" valign="bottom">

 

 

 

<td style="width: 100%">

 

 

 

<br />

 

 

 

<br />

 

 

 

<br />

 

 

 

<br />

 

 

 

<br />

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

<table id="tb3" runat="server" style="width: 985px; height: 50px;min-width:900px;cellspacing:0px">

 

 

 

<tr>

 

 

 

<td style="background-image: url('Images/extra bar1.jpg'); background-repeat: repeat;

 

 

 

 

clip: rect(auto, 25px, auto, auto); height: 15px;">

 

 

 

<table style="width: 100%">

 

 

 

<tr>

 

 

 

<td style="width: 20%; font-family: Calibri; font-size: 15px; padding: 5px" align="right">

 

 

 

<asp:LinkButton ID="lnkDesclaimer" runat="server" ForeColor="White">Desclaimer</asp:LinkButton>&nbsp;&nbsp;

 

 

 

<span style="color: white">|</span>

 

 

 

</td>

 

 

 

<td style="width: 20%; font-family: Calibri; font-size: 15px; padding: 5px" align="left">

 

 

 

&nbsp;

 

 

 

<asp:Label runat="server" ID="lbl1" Text="(Reserved)" ForeColor="White"></asp:Label>

 

 

 

</td>

 

 

 

<td style="width: 25%">

 

 

 

</td>

 

 

 

<td style="width: 25%; font-family: Calibri; font-size: 15px; padding: 5px;" align="right">

 

 

 

<img alt="" src="Images/phone.png" width="10" height="10" />&nbsp;<asp:Label ID="lblContactUs"

 

 

 

runat="server" ForeColor="White">Contact Us &nbsp;&nbsp;|</asp:Label>

 

 

 

</td>

 

 

 

<td style="font-family: Calibri; font-size: 15px; padding: 5px; width: 25%" align="left"

 

 

 

class="style1">

 

 

 

<img alt="" src="Images/print.gif" width="10" height="10" />&nbsp;<asp:Label runat="server"

 

 

 

ID="lblPrint" ForeColor="White" Text="Print"></asp:Label>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

 

 

</div>

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 


Thanks for any help,
Regards,
Satyajit Kadam.
Antonio Stoilkov
Telerik team
 answered on 16 Mar 2012
1 answer
143 views
Hi,

I am using the following mark up for a feature in my application with expandable group headers, so that i can hide and show accordingly via expand/collapse link button. The mark up for the grid is as below:

        <telerik:RadGrid ID="m_UIExperienceGrid" runat="server" SkinID="RecruitmentGrid_NoHeaders" CssClass="SimpleGrid summary"
            AllowMultiRowSelection="false" OnItemDataBound="OnExperienceGridItemDataBound">
            <MasterTableView AutoGenerateColumns="false" GroupLoadMode="Client" EditMode="InPlace">   
                <GroupByExpressions>
                    <telerik:GridGroupByExpression  >
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="GroupIndexName"  />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="GroupIndexName" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <GroupHeaderItemStyle CssClass="listItem" />   
                <Columns>
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>       
                                <div class="itemText"><%#Eval("JobDescription") %></div>
                            </ItemTemplate>       
                        </telerik:GridTemplateColumn>   
                </Columns>
            </MasterTableView>   
            <ClientSettings AllowGroupExpandCollapse="true">
                <ClientEvents OnGridCreated="GridCreated" />
            </ClientSettings>               
        </telerik:RadGrid>

The mark up for link button that does the collapse/expand is as below:
        <asp:LinkButton ID="m_UIExpandAllExperiencesLink" runat="server" OnClientClick="return ExpandCollapseAllGroups('rgExpand');"/>

        <asp:LinkButton ID="m_UICollapseAllExperiencesLink" runat="server" OnClientClick="return ExpandCollapseAllGroups('rgCollapse');" />

The java scripts are as below:

    function GridCreated(sender, eventArgs) {
            //collapse all items when page loads
            ExpandCollapseAllGroups('rgCollapse');
        }
       
        //Expands or collapses all group headers based on expandCollapseClass
        function ExpandCollapseAllGroups(expandCollapseClass) {
            var tableView = $find('<%=m_UIExperienceGrid.ClientID %>').get_masterTableView();
            var groupHeaders = $telerik.$(tableView.get_element()).find('INPUT[class="'+ expandCollapseClass +'"]');
            if (groupHeaders.length > 0) {
                for (var i = 0; i < groupHeaders.length; i++) {
                    $telerik.$(groupHeaders[i]).click();
                }
            }
            //return false to prevent postbacks
            return false;
        }

Essentially i leverage the css inbuilt for the telerik grid to do the expand/collpase from the client side.

This worked for me well a few days back, but i am facing issues recently, as per the screenshot attached, i have some comments in them as well. While expanding/collapsing the items is not happening individually too, just the expand/collapse image changes.
I have grid with grouping else where in my appln with server side expansion and collpase which is working fine but in the above scenario, it is not working.

Thanks and regards,
Damodar

Antonio Stoilkov
Telerik team
 answered on 16 Mar 2012
3 answers
278 views
Hi ,
When I Export to Excel from a  RadGrid then everything is fine, but if I Export RadGrid with GridTemplateColumn and RadComboBox as an  ItemTemplate, then the Value, DataValueField  ,of the RadComboBox  it show instead of the DataTextField.
How can extract the radcombox  DataTextField instead of  DataValueField  ?
thanks
Daniel
Telerik team
 answered on 16 Mar 2012
1 answer
161 views
Hi,

I am converting an existing ListView implementation  bound to an ObjectDataSource into a RadListView.
I have however reached a problem with the OnItemInserting event where I cannot see where to change the values that are being sent to the ObjectDataSource Insert Method
For example, in the existing ListView, I can specify:
protected void lvwTest_ItemInserting(object sender, ListViewInsertEventArgs e)
{
 e.Values["expert_id"] = 4;
}

 

How can I do this for a RadListView ?

Thanks,
Tsvetina
Telerik team
 answered on 16 Mar 2012
2 answers
307 views
Hi,

I'm having a problem with the RadAjaxManager. When I click the button for the first time, it works correclty (doing a partial postback). On the second click, a full postback is done. I found some similar posts on this issue, but none of them helped me solved the problem.

The button is inside a RadToolTip. The following code should reproduce the problem.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="BC_Cockpit.Website.test.WebForm1" %>
 
<%@ 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">
<head id="Head1" runat="server">
  <title></title>
  <script>
    alert('page load');
  </script>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnSaveGeneral">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="tipGeneralSettings" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>
    <img id="imgGeneralSettings" src="/main/images/icons/cog.png" alt="Settings" />
    <telerik:RadToolTip ID="tipGeneralSettings" IgnoreAltAttribute="true" runat="server" ShowDelay="0" IsClientID="true" ManualClose="true" TargetControlID="imgGeneralSettings"
      RenderInPageRoot="true" RelativeTo="Element" Position="BottomLeft" Width="250" ShowEvent="OnClick" Title="General settings" CssClass="bright-form-popup">
      Settings here..
      <asp:Button Text="Save" ID="btnSaveGeneral" runat="server" OnClick="btnSaveGeneral_Click" />
    </telerik:RadToolTip>
  </div>
  </form>
</body>
</html>

Watch for the 'page load'  alert on the 2nd click.

I'm a doing anything wrong? Or is this some kind of bug?

Thanks
Danny
Top achievements
Rank 1
 answered on 16 Mar 2012
1 answer
123 views
Is there any way for me to pull data from lower level nodes. LIke I have a root  node populating the parent nodes nd that populates the child nodes.. and so on and so forth. But im making a folder system and if a user added a new folder i have no way without hardcoding it to do what i need it too.. and i dont want to limit the folder numbers.. heres some code to show you waht im attempting. I want to do the foreach loops when the lower level nodes contain nodes.. anyway to do this not hardcoded
foreach (RadTreeNode node in rtvFiles.Nodes)
            {
                foreach (RadTreeNode parentNode in node.Nodes)
                {
                    foreach (RadTreeNode childNode in parentNode.Nodes)
                    {
                        //if (parentNode.Text == "share")
                        //{
 
                        if (childNode.Checked)
                        {
                            FilesCOL file = FilesDAL.SelectByName(childNode.Text, int.Parse(childNode.Attributes["FileID"]));
                            c = file.FilePath;
                            b = childNode.Text;
                            d = file.FileID.ToString();
                        }
                        else
                        { if(childNode.Checkable==false)
                            foreach (RadTreeNode babyNode in childNode.Nodes)
                            {
                                 
                                if (babyNode.Checked)
                                {
                                    FilesCOL file = FilesDAL.SelectByName(babyNode.Text, int.Parse(babyNode.Attributes["FileID"]));
                                    c = file.FilePath;
                                    b = babyNode.Text;
                                    d = file.FileID.ToString();
                                }
}
}
ome code to show you waht im attempting
Bozhidar
Telerik team
 answered on 16 Mar 2012
1 answer
77 views
All

I have created a page that uses a control that will generate radgrids (up to 5 grids)  - each grid has "allowmultirowedit" = true - so that each gridRow can be modified.  The "parent" page contains the "Save" button ...  I need to tie the Save button action to each of the radgrids ...  like the GridView "SaveButtonId" property - any ideas?
Tsvetina
Telerik team
 answered on 16 Mar 2012
2 answers
169 views
Hallo,

I know the topic has already been mentioned in the forum and the help, but the threads did not work for me.

I'm trying to set the default font that's used when I create a new item. Changing the default font of the browser works fine, but I'd like to have a server based setting.

I have a css-file in the layouts folder, that contains a proper defintion for 'body'. How can I redirect the RadEditor control to use this file to render the default font?

I'd appreciate your help,
Philip Thomé
Philip
Top achievements
Rank 1
 answered on 16 Mar 2012
1 answer
199 views
Edit - Nevermind - the below does work with RadButton - just had a typo in my code.  Would be nice to add this to the documention here:

http://www.telerik.com/help/aspnet-ajax/button-client-side-basics.html 

--------

I can't seem to find anything on this - but it seems like a pretty simple task.  I would like to dynamically change the tooltip on a RadButton in Javascript.  I see there is a .get_toolTip(), but no mention of a .set_toolTip()?

I was hoping I could do something simple like this:

$find('<%= RadButton1.ClientID %>').set_toolTip('New tooltip');
Slav
Telerik team
 answered on 16 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?