Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
605 views
Hello,
I'm receiving the following error after uninstalling RadControls_for_ASP.NET_AJAX_2008_1_515_trial.exe. We currently use the 2.0 controls , RadCalendar.Net2.dll, RadInput.Net2.dll, RadTreeView.Net2.dll.  I wanted to try the telerik AJAX controls and downloaded the above trial, back in the summer of 2008.  After experimenting with the tools, we decided to wait to implement any AJAX controls.  Yesterday I attemped to remove (uninstall) the Telerik AJAX and I now recieve the following error when compiling the website OR displaying a page.  Error    2    Could not load file or assembly 'Telerik.Charting, Version=2.0.1.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763' or one of its dependencies. The system cannot find the file specified.        I never updated the RAD controls that were included in my BIN file. those were never touched.  I created new pages without the AJAX components and it had worked just fine.  When I removed the AJAX controls, I receive the above error.   There are no references to Telerik.Charting in the project, there are no references to this in the GAC, there are no references to this in the Web.Config, there are no references in the BIN file, and as far as I can see there are no dependencies in the current RAD controls to telerik.charting,   there are no references in the temporary web files and/or cache, and there are no references to telerik.charting in the registry.  What am I missing?  why is the CLR runtime still attempting to locate this file?  Any help is appreciated.
Pete
Top achievements
Rank 1
 answered on 17 Apr 2009
1 answer
142 views
I'm having trouble getting client side validation of file extensions to work.  I have a page where users can upload a single file using the RadUpload control. I'm trying to use the validateExtensions function to validate the file extension.  I believe my code matches the example in your documentation but I am getting the javascript error "'null' is null or not an object" whenever validateExtensions is called.   If I hardcode true or false in place of my call to validateExtensions then I don't get the javascript error.  Below is my code.  

 

 

<%@ Page Language="VB" MasterPageFile="~/HBC_MP.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="data_transfer_upload_Default" title="File Transfer Admin Detail" Theme="MainTheme" %> 
<%@ Register Assembly="RJS.Web.WebControl.PopCalendar" Namespace="RJS.Web.WebControl" TagPrefix="rjs" %> 
<%@ Register TagPrefix="rad" Namespace="Telerik.WebControls" Assembly="RadUpload.Net2" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
<div id="container_middle"  class="clearfix" style="background-color:#eeeeee">   
<div id="content" style="width:910px">  
            <table style="width:100%">  
                <tr> 
                    <td> 
                                <h1 class="brand" style="width:600px;BACKGROUND-color: #eee;BORDER-LEFT: 0px;BORDER-RIGHT: 0px;text-transform:none;float:left;">  
                Data Transfer - File Upload  
            </h1> 
                    </td> 
                    <td style="vertical-align:middle;text-align:right">  
                              <asp:HyperLink ID="linkDownload" runat="server"  NavigateUrl="~/data_transfer/Default.aspx"  Font-Size="11.3px" Font-Underline="true">Download Files</asp:HyperLink> 
            
                    </td> 
                </tr> 
            </table> 
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
<br \> 
        <script type="text/javascript">  
            function increasingFileInputWidth(radUpload, args)  
            {  
             //If the Checkboxes in RadUpload are not visible, change the index to 0  
                var cell = args.Row.cells[0];  
                var inputs = cell.getElementsByTagName('INPUT');  
                for (var i=0; i<inputs.length; i++)  
                {  
                    if (inputs[i].type == "file")  
                    {  
                        inputs[i].size = 75;  
                    }  
                }  
            }  
        </script> 
 
<table align="Center">  
<tr> 
    <td> 
 
<table class="tablenav" align="left" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;margin-left:0px;margin-bottom:0px;width:750px;">  
    <tr> 
        <td align="right" valign="middle">  
        <rad:radprogressmanager id="Radprogressmanager1" runat="server" /> 
        </td> 
        <td valign="middle" colspan="3">  
            <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label> 
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please Correct the Following"/>  
        </td> 
    </tr> 
    <tr style="height:23px">  
        <td align="right" valign="middle" style="height: 23px">  
            <asp:Label ID="lblCurrentFile" runat="server" Text="Currently Loaded File Name:"></asp:Label></td>  
        <td valign="middle" style="height: 23px" colspan="3">  
            <asp:Label ID="lblCurrentFileData" runat="server" EnableTheming="False"></asp:Label></td>  
    </tr> 
    <tr style="height:23px">  
 
        <td valign="middle" align="right" style="height: 23px">  
            <asp:Label ID="lblFile" runat="server" Text="Choose File:"></asp:Label></td>  
        <td valign="middle" style="height: 23px;padding-left: 2px" colspan="3">  
            &nbsp;&nbsp;Files can not be larger than 50MB  
            <rad:radupload   
                id="RadUpload1"   
                runat="server" MaxFileInputsCount="1" ControlObjectsVisibility="None" OnClientAdded="increasingFileInputWidth" EnableFileInputSkinning="False" Skin="Default" 
                 AllowedFileExtensions=".doc,.ppt,.xls,.pdf,.jpg,.jpeg,.gif,.txt,.avi,.dxf,.tif,.tiff" /> 
            <rad:radprogressarea id="progressArea1" runat="server" ProgressIndicators="TotalProgressBar, TotalProgress, TotalProgressPercent, RequestSize, TimeElapsed, TimeEstimated, TransferSpeed" Skin="HBC"></rad:radprogressarea> 
<asp:CustomValidator runat="server" id="CustomValidator1" 
  ClientValidationFunction="validateRadUpload1" 
  OnServerValidate="CustomValidator1_ServerValidate" ErrorMessage="Invalid File Extension." Display="None"></asp:CustomValidator> 
        <script type="text/javascript">  
 function validateRadUpload1(source, arguments)  
 {  
   arguments.IsValid = $find("<%=RadUpload1.ClientID%>").validateExtensions();  
 }  
</script>   
        </td> 
 
    </tr> 
    <tr style="height:23px">  
        <td align="right">  
            <asp:Label ID="lblFileDesc" runat="server" Text="File Description:"></asp:Label> 
        </td> 
        <td colspan="3">  
            <asp:TextBox ID="txtFileDesc" runat="server" Width="513px"></asp:TextBox> 
            <asp:RequiredFieldValidator ID="rfvFileDesc" runat="server" ControlToValidate="txtFileDesc" 
                ErrorMessage="File Description is Required." >*</asp:RequiredFieldValidator></td>  
    </tr> 
    </table> 
 <br /> 
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
                <ContentTemplate> 
                <table class="tablenav" align="left" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;margin-left:0px;margin-bottom:0px;width:750px;">  
    <tr style="height:23px">  
        <td align="right"  style="width:110px">  
            <asp:Label ID="lblCategory" runat="server" Text="Category:"></asp:Label> 
        </td> 
        <td style="width:215px">  
            <asp:DropDownList ID="ddlCategory" runat="server">  
            </asp:DropDownList> 
            <asp:Label ID="lblNoCategory" runat="server" Text="N/A" EnableTheming="False"></asp:Label> 
        </td> 
        <td align="left" > 
            <asp:Label ID="lblFileType" runat="server" Text="File Type:"></asp:Label> 
        </td> 
        <td> 
            <asp:DropDownList ID="ddlFileType" runat="server" AutoPostBack="True">  
            </asp:DropDownList> 
        </td> 
    </tr> 
 
    </table> 
    </ContentTemplate> 
    </asp:UpdatePanel> 
<br /> 
<table class="tablenav" align="left" border="0" cellpadding="0" cellspacing="0" style="margin-top:10px;margin-left:0px;margin-bottom:0px;width:750px;">  
                        <tr> 
                            <td style="width:110px">&nbsp;</td> 
                            <td colspan="3">  
                                <asp:Button ID="btnSave" runat="server" Text="Upload File" CssClass="button100" /> 
                            </td> 
                        </tr> 
                      </table> 
      
    </td> 
</tr> 
</table> 
<br /> 
 
<hr /> 
 
</asp:Content> 
 

 

 

 



Genady Sergeev
Telerik team
 answered on 17 Apr 2009
1 answer
125 views
Is it possible to add child nodes to RadTreeNodeData class? we need to add 2 level of nodes to any node using the webservice binding
Veselin Vasilev
Telerik team
 answered on 17 Apr 2009
1 answer
97 views
I am getting following error when I transfer from one page to another.

"Microsoft JScript runtime error: Unexpected ajax response was received from the server.
This may be caused by one of the following reasons:

 - Server.Transfer.
 - Custom http handler.
- Incorrect loading of an "Ajaxified" user control."

Pleae see the detailed explanation below:

 

I have say two pages, a.aspx and b.aspx. b.aspx has Radcontrols combo boxes. I am refreshing some rad combo boxes and other .Net controls on change of a drop-down value through Ajax (without page refresh). when I go from a.aspx to b.aspx and change some value on b.aspx, I am getting above error.

Daniel
Telerik team
 answered on 17 Apr 2009
2 answers
175 views
I have a Splitter on a page with 2 panes and a single SlideingZone.  The zone is used to hide away the search options for the page.  I found an old forum post that has most of the functionality I want to have.  If you click on the SlidingPane Title, the pane slides out and automatically docks open.  Perfect.  But, I want to be able to click on the SlidingPane Title and have it un-dock and close.  How do I get that to happen?

The referenced post is quite old, so perhaps there is a different way to do it now.  I am using Q1 2009.

Thanks!

hacker
Top achievements
Rank 1
 answered on 17 Apr 2009
1 answer
65 views
Hi

I would like to reduce the amount of margin around the content of the panel bar.
How can I set this in the site css file?

I am using the default skin.

Thanks

Clive
Alex Gyoshev
Telerik team
 answered on 17 Apr 2009
1 answer
194 views
I am using the RadGrid and forcing a rebind of it by using the $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequestWithTarget("<%= RisksRadGrid.UniqueID %>", ""); call.  This call is inside a javascript function called riskFilterClick(pControl, pFilter, pFormLoad) a sample call to this function from the onClick event of a td cell looks like riskFilterClick(this, 4, false);. I have several of these calls which are all td cells with images and text in them that the user clicks on to filter the dataset. I have a hidden dropdownlist which the javascript updates the selectedItem in before calling the rebind of the datagrid. In the databinding logic of the grid it reads the value out of the hidden dropdownlist and appends any search text entered by the user in the search textbox. All of this is working great... however my problem is when this same riskFilterClick(this, 4, false); is called by the onClick of an HTML input box for some reason and randomly it seems the images in my grid are not rendered after rebinding? If I "view source" of the grid the <img> tags exist however if I alert the innerHTML of each datagrid cell through javascript popups after the rebinding the image tags are gone? If I click back to another image (different filter and only if I change to a different filter) the grid seems to correct itself and put the images back in??

Be aware that I have 3 user controls included in 1 master page and I have uploaded all the code from just 1 of the user controls although they are all similar and are all experiencing the same problem.
<%@ Control Language="VB" AutoEventWireup="true" CodeFile="MyRisks.ascx.vb" Inherits="MyRisks" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
<link href="Stylesheets/CustomGridStyle.css" rel="stylesheet" type="text/css" /> 
 
<telerik:RadAjaxManagerProxy ID="RisksRadAjaxManager" runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RisksRadGrid"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RisksRadGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="cRiskShow"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RisksRadGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskShow" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskSearchForText" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskSearchForBtn" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
        <telerik:AjaxSetting AjaxControlID="cRiskSearchForBtn"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RisksRadGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskShow" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskSearchForText" /> 
                <telerik:AjaxUpdatedControl ControlID="cRiskSearchForBtn" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 
<telerik:RadAjaxLoadingPanel ID="RisksRadAjaxLoadingPanel1" runat="server" Transparency="30" IsSticky="true"
</telerik:RadAjaxLoadingPanel> 
<telerik:RadCodeBlock ID="RiskRadCodeBlock1" runat="server"
    <script type="text/javascript"
        var vRiskFilter = 0; //default this to "Open" 
 
        function riskRowDblClick(sender, eventArgs) { 
            var grid = $find("<%=RisksRadGrid.ClientID %>"); 
            var MasterTable = grid.get_masterTableView(); 
 
            var vElementNo, vRevision, vDomain; 
            var vCurrentDomain = document.getElementById('<%= hdnRiskCurrentDomain.ClientID %>').value; 
 
            var selectedRows = MasterTable.get_selectedItems(); 
            for (var i = 0; i < selectedRows.length; i++) { 
                var row = selectedRows[i]; 
                vElementNo = MasterTable.getCellByColumnUniqueName(row, "ElementNo").innerHTML; 
                vDomain = MasterTable.getCellByColumnUniqueName(row, "Domain").innerHTML; 
                vRevision = MasterTable.getCellByColumnUniqueName(row, "Revision").innerHTML; 
                //here ElementNo / Domain / Revision holds the value of the cell 
            } 
 
            if (vDomain != vCurrentDomain) { 
                window.open('RedirectNewDomain.aspx?Domain=' + vDomain + '&URL=../../Application/BPControls/Redirect.aspx?Link=AT/' + vElementNo + '/' + vRevision + 
                    '/Signatures&StartUpCaption=' + vElementNo, '', 'toolbar=no,location=no,menubar=no,directories=no,width=400,height=200'); 
            } 
            else { 
                parent.parent.OpenPageInMDI('../../Application/ActionTracker/AForm.aspx?Element=' + vElementNo + '&Revision=' + vRevision, vElementNo); 
            } 
        } 
        function riskFilterClick(pControl, pFilter, pFormLoad) { 
            //set the global variable for identifying what grid is to be "greyed" out while performing the AJAX call. This 
            //is needed because the MyPims page has 3 user controls in it and they will all "share" this same RequestStart & HideLoadingPanel functions 
            currentUpdatedControl = "<%=RisksRadGrid.ClientID%>"
            currentLoadingPanel = "<%=RisksRadAjaxLoadingPanel1.ClientID%>"
             
            //set the global variable holding which filter has been clicked 
            if (pFilter != null) { 
                vRiskFilter = pFilter
                //loops through td cells and resets backgrounds to white. 
                var cCells = document.getElementById("cRiskfilterTable").getElementsByTagName("td"); 
                var cNumCells = cCells.length; 
                for (var i = 0; i < cNumCells; ++i) { 
                    if (cCells[i].className == "Filters") { 
                        cCells[i].style.backgroundColor = 'white'
                    } 
                } 
            } 
 
            pControl.style.backgroundColor = '#bbd7fa'; //highlight selected td cell 
            //reset background of search button if search text box is empty 
            if (document.getElementById('<%=cRiskSearchForText.ClientID %>').value == "") { 
                document.getElementById('cRiskSearchForBtn').style.backgroundColor = 'white'
            } 
            else { 
                document.getElementById('cRiskSearchForBtn').style.backgroundColor = '#bbd7fa'
            } 
 
            if (pFilter != null) { 
                //get the client side ID of the dropdownlist 
                var cDropDownList = document.getElementById('<%=cRiskShow.ClientID %>'); 
                cDropDownList.options[vRiskFilter].selected = true
            } 
 
            if (!pFormLoad) { 
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequestWithTarget("<%= RisksRadGrid.UniqueID %>", ""); 
            } 
        } 
        function startUpRiskScript() { 
            addMaskToRiskSorting(); 
            var cDropDownList = document.getElementById('<%=cRiskShow.ClientID %>'); 
 
            //find which control that needs to be highlighted by default onLoad of control. 
            var cCells = document.getElementById("cRiskfilterTable").getElementsByTagName("td"); 
            var cNumCells = cCells.length; 
            for (var i = 0; i < cNumCells; ++i) { 
                if (cCells[i].className == "Filters") { 
                    if (cCells[i].name.toUpperCase() == cDropDownList.options[cDropDownList.selectedIndex].text.toUpperCase()) { 
                        riskFilterClick(cCells[i], cDropDownList.selectedIndex.value, true); 
                    } 
                } 
            } 
        } 
        function addMaskToRiskSorting() { 
            //Need this to get the mask to work when sorting the grid 
            //Set up the risks grid headers 
            cHeaders = document.getElementById("<%=RisksRadGrid.ClientID %>").getElementsByTagName("a"); 
            cNumCells = cHeaders.length; 
            for (x = 0; x < cNumCells; ++x) { 
                if (cHeaders[x].href.indexOf("setRiskGlobalVariables();RequestStart(null, null);") == -1) { 
                    cHeaders[x].href = "javascript:setRiskGlobalVariables();RequestStart(null, null);" + cHeaders[x].href.replace(/javascript:/, ''); 
                } 
            } 
        } 
        function setRiskGlobalVariables() { 
            currentUpdatedControl = "<%=RisksRadGrid.ClientID%>"
            currentLoadingPanel = "<%=RisksRadAjaxLoadingPanel1.ClientID%>"
        } 
    </script> 
</telerik:RadCodeBlock> 
<table style="width: 90%; height: 100%;"
    <tr> 
        <td> 
            <table style="height:40px"
                <tr> 
                    <td style="display:none"
                        Show: 
                    </td> 
                    <td style="display:none;"
                        <asp:DropDownList AutoPostBack="true" OnSelectedIndexChanged="cRiskShow_SelectedIndexChanged" 
                            ID="cRiskShow" runat="server" Width="150px"
                            <asp:ListItem Value="0" Selected="True">Open</asp:ListItem> 
                            <asp:ListItem Value="1">Closed</asp:ListItem> 
                            <asp:ListItem Value="2">No Filter</asp:ListItem> 
                            <asp:ListItem Value="3">Very Low</asp:ListItem> 
                            <asp:ListItem Value="4">Low</asp:ListItem> 
                            <asp:ListItem Value="5">Medium</asp:ListItem> 
                            <asp:ListItem Value="6">High</asp:ListItem> 
                            <asp:ListItem Value="7">Very High</asp:ListItem> 
                        </asp:DropDownList> 
                    </td> 
                    <td nowrap="nowrap"
                        Filter For: 
                    </td> 
                    <td style="width: 200px"
                        <telerik:RadTextBox ID="cRiskSearchForText" Width="200px" runat="server" Skin="Office2007" AutoPostBack="true" OnTextChanged="RadTextBox1_TextChanged"
                        </telerik:RadTextBox> 
                    </td> 
                    <td style="width: 50px"
                        <input type="button" id="cRiskSearchForBtn" value="Search" onclick="riskFilterClick(this, null, false);RequestStart(null, null);" /> 
                    </td> 
                    <td style="width:10px"></td> 
                    <td style="width:100%" align="right"
                      <table id="cRiskfilterTable" style="height: 40px; font-family: Arial; font-size: 8pt" cellpadding="2"
                        <tr> 
                            <td style="width:100%" align="right" colspan="5">&nbsp;</td> 
                            <td name="Open" nowrap="nowrap" class="Filters" title="Filter for Open Risks" onclick="riskFilterClick(this, 0, false);RequestStart(null, null);"
                                <img src="Images/email_open.png" alt="" />&nbsp;Open</td> 
                            <td style="width: 10px"></td> 
                            <td nowrap="nowrap" name="Closed" class="Filters" title="Filter for Closed Risks" onclick="riskFilterClick(this, 1, false);RequestStart(null, null);"
                                <img src="Images/email.png" alt="" />&nbsp;Closed</td> 
                            <td style="width: 10px"></td> 
                            <td nowrap="nowrap" name="No Filter" class="Filters" title="No Filter" onclick="riskFilterClick(this, 2, false);RequestStart(null, null);"
                                <img src="Images/cancel.png" alt="" />&nbsp;No Filter</td> 
                            <td style="width: 10px"></td> 
                        </tr> 
                        <tr> 
                            <td style="width:100%">&nbsp;</td> 
                            <td name="Very Low" nowrap="nowrap" class="Filters" title="Filter for Very Low Risks" onclick="riskFilterClick(this, 3, false);RequestStart(null, null);"
                                <img src="Images/bubble_aqua.gif" alt="" />Very Low</td> 
                            <td style="width: 10px"></td> 
                            <td name="Low" nowrap="nowrap" class="Filters" title="Filter for Low Risks" onclick="riskFilterClick(this, 4, false);RequestStart(null, null);"
                                <img src="Images/bubble_green.gif" alt="" />Low</td> 
                            <td style="width: 10px"></td> 
                            <td name="Medium" nowrap="nowrap" class="Filters" title="Filter for Medium Risks" onclick="riskFilterClick(this, 5, false);RequestStart(null, null);"
                                <img src="Images/bubble_yellow.gif" alt="" />Medium</td> 
                            <td style="width: 10px"></td> 
                            <td name="High" nowrap="nowrap" class="Filters" title="Filter for High Risks"  onclick="riskFilterClick(this, 6, false);RequestStart(null, null);"
                                <img src="Images/bubble_orange.gif" alt="" />High</td> 
                            <td style="width: 10px"></td> 
                            <td name="Very High" nowrap="nowrap" class="Filters" title="Filter for Very High Risks"  onclick="riskFilterClick(this, 7, false);RequestStart(null, null);"
                                <img src="Images/bubble_red.gif" alt="" />Very High</td> 
                            <td style="width: 10px"></td> 
                        </tr> 
                    </table> 
                    </td> 
                </tr> 
            </table> 
        </td> 
    </tr> 
    <tr> 
        <td> 
            <telerik:RadGrid ID="RisksRadGrid" PageSize="50" runat="server" Height="400px" BackColor="#CDE4FA"
                <FooterStyle CssClass="GridFooter_Office2007"></FooterStyle>  
                <SelectedItemStyle CssClass="GridSelectedItemStyle" /> 
                <HeaderContextMenu Skin="Office2007" EnableTheming="True"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <MasterTableView> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <AlternatingItemStyle CssClass="GridAltItemStyle" /> 
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true"
                    </Scrolling> 
                    <Selecting AllowRowSelect="true" /> 
                    <ClientEvents OnRowDblClick="riskRowDblClick" /> 
                </ClientSettings> 
                <FilterMenu Skin="Office2007" EnableTheming="True"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 
        </td> 
    </tr> 
    <input id="hdnRiskCurrentDomain" type="text" runat="server" style="display:none" /> 
</table> 
<script language="javascript"
    startUpRiskScript(); 
</script> 

Imports System 
Imports System.Data 
Imports System.Configuration 
Imports System.Collections 
Imports System.Web 
Imports System.Web.Security 
Imports System.Web.UI 
Imports System.Web.UI.WebControls 
Imports System.Web.UI.WebControls.WebParts 
Imports System.Web.UI.HtmlControls 
Imports System.Xml 
Imports System.Text 
Imports Appframe3.Common.Data 
Imports Appframe3.Web.Common 
Imports Telerik.Web.UI 
 
Partial Class MyRisks 
    Inherits System.Web.UI.UserControl 
 
    Private Const gMaxDays As Integer = 999999 
 
    Private Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) 
        SetDomainSettings() 
        RisksRadGrid.Columns.Clear() 
        GetElements() 
 
        'If String.IsNullOrEmpty(RadAjaxManager.GetCurrent(Me.Page).ClientEvents.OnRequestStart) Then 
        '    RadAjaxManager.GetCurrent(Me.Page).ClientEvents.OnRequestStart = "RequestStart" 
        'End If 
        If String.IsNullOrEmpty(RadAjaxManager.GetCurrent(Me.Page).ClientEvents.OnResponseEnd) Then 
            RadAjaxManager.GetCurrent(Me.Page).ClientEvents.OnResponseEnd = "HideLoadingPanel" 
        End If 
    End Sub 
 
    Private Sub SetDomainSettings() 
        Dim vRecordSource As New afRecordSource 
        vRecordSource.ViewName = "stbv_System_Users" 
        vRecordSource.SelectColumns.Add("CurrentDomain"
        vRecordSource.SelectColumns.ExcludePrimKey = True 
        vRecordSource.WhereClause = "Login = SUSER_SNAME()" 
        Dim vCurDomain As String = afAccessLayer.GetDataScalar(vRecordSource).ToString() 
        hdnRiskCurrentDomain.Value = vCurDomain 
 



    End Sub 
 
    Private Sub GetElements() 
        Dim vProcedure As New afProcedureCall 
        vProcedure.ProcedureName = "astp_RiskMgmt_MissingRisks" 
 
        Dim vDataTable As DataTable = afAccessLayer.ExecProcedure(vProcedure).Tables(0) 
 
        Dim vSearchText As String = "" 
        Dim vOrderBy As String = "OpenStatus DESC, RiskScoreNumber DESC, WBSLevel3, ElementID, ID" 
 
        vSearchText = "ISNULL([Risk ID],'') + ISNULL(Title,'') + ISNULL([Risk Type],'') + ISNULL([Risk Score],'') + ISNULL(Status,'') Like '%" + cRiskSearchForText.Text.Trim + "%' AND " 
 
        If cRiskShow.SelectedValue = "0" Then 'Open 
            vSearchText += "OpenStatus = 1 " 
        ElseIf cRiskShow.SelectedValue = "1" Then 'Closed 
            vSearchText += "OpenStatus = 0 " 
        ElseIf cRiskShow.SelectedValue = "2" Then 'No Filter 
            vSearchText += vSearchText.Replace(" AND """
        ElseIf cRiskShow.SelectedValue = "3" Then 'Very Low 
            vSearchText += "[Risk Score] = 'Very Low'" 
        ElseIf cRiskShow.SelectedValue = "4" Then 'Low 
            vSearchText += "[Risk Score] = 'Low'" 
        ElseIf cRiskShow.SelectedValue = "5" Then 'Medium 
            vSearchText += "[Risk Score] = 'Medium'" 
        ElseIf cRiskShow.SelectedValue = "6" Then 'High 
            vSearchText += "[Risk Score] = 'High'" 
        ElseIf cRiskShow.SelectedValue = "7" Then 'Very High 
            vSearchText += "[Risk Score] = 'Very High'" 
        End If 
 
        RisksRadGrid.DataSource = vDataTable.[Select](vSearchText, vOrderBy) 
 
        RisksRadGrid.AutoGenerateColumns = False 
        RisksRadGrid.DataSource = vDataTable.[Select](vSearchText, vOrderBy) 
        RisksRadGrid.Width = Unit.Pixel(1005) 
        RisksRadGrid.GridLines = GridLines.None 
        RisksRadGrid.AllowSorting = True 
        RisksRadGrid.AllowPaging = False 
        RisksRadGrid.Skin = "Office2007" 
        RisksRadGrid.ShowFooter = True 
 
        Dim vColumnImage As New GridTemplateColumn 
        RisksRadGrid.Columns.Add(vColumnImage) 
        vColumnImage.UniqueName = "ImgColumn" 
        vColumnImage.HeaderText = "" 
        vColumnImage.ItemStyle.Width = Unit.Pixel(20) 
        vColumnImage.HeaderStyle.Width = Unit.Pixel(20) 
 
        Dim vColumn As New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Domain" 
        vColumn.HeaderText = "Domain" 
        vColumn.UniqueName = "Domain" 
        vColumn.AllowSorting = True 
        vColumn.ItemStyle.Width = Unit.Pixel(60) 
        vColumn.HeaderStyle.Width = Unit.Pixel(60) 
 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "OpenStatus" 
        vColumn.HeaderText = "" 
        vColumn.UniqueName = "OpenStatus" 
        vColumn.Visible = False 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Risk ID" 
        vColumn.HeaderText = "ID" 
        vColumn.UniqueName = "ElementNo" 
        vColumn.AllowSorting = True 
        vColumn.ItemStyle.Width = Unit.Pixel(150) 
        vColumn.HeaderStyle.Width = Unit.Pixel(150) 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Title" 
        vColumn.HeaderText = "Title" 
        vColumn.AllowSorting = True 
        vColumn.ItemStyle.Width = Unit.Pixel(300) 
        vColumn.HeaderStyle.Width = Unit.Pixel(300) 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Risk Type" 
        vColumn.HeaderText = "Risk Type" 
        'vColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center 
        vColumn.AllowSorting = True 
        vColumn.ItemStyle.Width = Unit.Pixel(100) 
        vColumn.HeaderStyle.Width = Unit.Pixel(100) 
        vColumn.DataFormatString = "{0:d}" 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Risk Score" 
        vColumn.HeaderText = "Risk Score" 
        vColumn.UniqueName = "RiskScore" 
        'vColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center 
        vColumn.AllowSorting = True 
        vColumn.ItemStyle.Width = Unit.Pixel(100) 
        vColumn.HeaderStyle.Width = Unit.Pixel(100) 
 
        vColumnImage = New GridTemplateColumn 
        RisksRadGrid.Columns.Add(vColumnImage) 
        vColumnImage.UniqueName = "ColorColumn" 
        vColumnImage.HeaderText = "" 
        vColumnImage.ItemStyle.Width = Unit.Pixel(20) 
        vColumnImage.HeaderStyle.Width = Unit.Pixel(20) 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "Status" 
        vColumn.UniqueName = "Status" 
        vColumn.HeaderText = "Status" 
        vColumn.AllowSorting = True 
        vColumn.Aggregate = GridAggregateFunction.Count 
        vColumn.FooterText = "Total Risks: " 
        'vColumn.ItemStyle.Width = Unit.Pixel(75) 
        'vColumn.HeaderStyle.Width = Unit.Pixel(75) 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "WBSLevel3" 
        vColumn.HeaderText = "" 
        vColumn.UniqueName = "WBSLevel3" 
        vColumn.Visible = False 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "ElementID" 
        vColumn.HeaderText = "" 
        vColumn.UniqueName = "ElementID" 
        vColumn.Visible = False 
 
        vColumn = New GridBoundColumn 
        RisksRadGrid.Columns.Add(vColumn) 
        vColumn.DataField = "ID" 
        vColumn.HeaderText = "" 
        vColumn.UniqueName = "ID" 
        vColumn.Visible = False 
 
    End Sub 
 
    Protected Sub RisksRadGrid_ItemDataBound(ByVal sender As ObjectByVal e As GridItemEventArgs) Handles RisksRadGrid.ItemDataBound 
        If TypeOf e.Item Is GridDataItem Then 
            Dim item As GridDataItem = TryCast(e.Item, GridDataItem) 
 
            Dim img As New Image() 
            img.ID = "Image1" 
 
            If item("OpenStatus").Text = "1" Then 
                img.ImageUrl = "Images/email_open.png" 
            Else 
                img.ImageUrl = "Images/email.png" 
            End If 
            item("ImgColumn").Controls.Add(img) 
 
            ' Add coloring for items. 
            Dim dataBoundItem As GridDataItem = e.Item 
 
            Dim imgRed As New Image() 
            imgRed.ID = "ImageRed" 
            imgRed.ImageUrl = "Images/bubble_red.gif" 
 
            Dim imgOrange As New Image() 
            imgOrange.ID = "ImageOrange" 
            imgOrange.ImageUrl = "Images/bubble_orange.gif" 
 
            Dim imgGreen As New Image() 
            imgGreen.ID = "ImageGreen" 
            imgGreen.ImageUrl = "Images/bubble_green.gif" 
 
            Dim imgAqua As New Image() 
            imgOrange.ID = "ImageAqua" 
            imgOrange.ImageUrl = "Images/bubble_aqua.gif" 
 
            Dim imgYellow As New Image() 
            imgGreen.ID = "ImageYellow" 
            imgGreen.ImageUrl = "Images/bubble_yellow.gif" 
 
            Select Case dataBoundItem("RiskScore").Text 
                Case "Very High" 
                    item("ColorColumn").Controls.Add(imgRed) 
                    Exit Select 
                Case "High" 
                    item("ColorColumn").Controls.Add(imgOrange) 
                    Exit Select 
                Case "Medium" 
                    item("ColorColumn").Controls.Add(imgYellow) 
                    Exit Select 
                Case "Low" 
                    item("ColorColumn").Controls.Add(imgGreen) 
                    Exit Select 
                Case "Very Low" 
                    item("ColorColumn").Controls.Add(imgAqua) 
                    Exit Select 
            End Select 
        End If 
    End Sub 
 
    Private Sub RisksRadGrid_PageIndexChanged(ByVal source As ObjectByVal e As GridPageChangedEventArgs) Handles RisksRadGrid.PageIndexChanged 
        GetElements() 
    End Sub 
 
    Public Sub RisksRadGrid_SortCommand(ByVal source As ObjectByVal e As GridSortCommandEventArgs) Handles RisksRadGrid.SortCommand 
        RisksRadGrid.MasterTableView.Rebind() 
    End Sub 
 
    Protected Sub cRiskShow_SelectedIndexChanged(ByVal sender As ObjectByVal e As System.EventArgs) 'Handles cRiskShow.SelectedIndexChanged 
        RisksRadGrid.MasterTableView.Rebind() 
    End Sub 
 
    Protected Sub cSearchForBtn_Click(ByVal sender As ObjectByVal e As System.EventArgs) 'Handles cSearchForBtn.Click 
        RisksRadGrid.MasterTableView.Rebind() 
    End Sub 
 
    Protected Sub RadTextBox1_TextChanged(ByVal sender As ObjectByVal e As System.EventArgs) 
        'RisksRadGrid.MasterTableView.Rebind() 
    End Sub 
End Class 
 

Sorry the code is starting to get a little messy as I've been struggling with this for quite some time now and have been trying a lot of different things to get it working. I've even replaced the input button with another image and used the onClick event of the td cell which is similiar to the other filters that are working but that has produced the same problem with the missing images. Any help would be appreciated.

I should also add that the RequestStart() and HideLoadingPanel() functions as well as the currentLoadingPanel and currentUpdatedControl variables are in a separate JS file that is included in the master aspx page.

Kyle.
Kyle Kasur
Top achievements
Rank 1
 answered on 17 Apr 2009
1 answer
137 views
Hi

I creat dynamic dock and I add defaultcommands attribute. but not working.

//this is not working..

dock.DefaultCommands = Telerik.Web.UI.Dock.

DefaultCommands.ExpandCollapse;

 

//but this attr. working good
dock.Collapsed =

 

true;

thank you...

 

 

 
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 17 Apr 2009
1 answer
76 views
Hello

I need to implement the functionality to export the whole chart layout into MS Word and MS excel and finally PDF like SSRS does.

Can anyone help as soon as please
Very urgent

Dessy
Telerik team
 answered on 17 Apr 2009
2 answers
64 views
Hi, I want to know if anything has changed from the Q3 2008 to Q1 2009 version in the sorting feature of RadGrid. When I was using the Q3 2008 version of Telerik the sorting in my grids where working just fine. After I updated the version of Telerik RadControls the sorting in those grids didn't work. I click in the header, the arrow informing the mode of the sorting (Ascending, Descending) is shown, but there is no change in the order of the data in the grid. Before the update it was working as expected. There is a new property to set in this new version I am missing?

Thanks in advance,

Simón de Lizarza
Simón
Top achievements
Rank 1
 answered on 17 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?