Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
158 views

Hello,

I have very simple grid to load 2000 rows per page. while expanding details table it's taking load/render about 10 seconds. But details table has only 3 rows.

Here is my code. please advise me if i am doing anything wrong.

<telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="true" AutoGenerateColumns="False"
            PageSize="2000" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True"
            OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataKeyNames="PersonID"  AllowMultiColumnSorting="True">
                 <Columns>
                    <telerik:GridBoundColumn SortExpression="LeadFullName" HeaderText="LeadFullName"                       HeaderButtonType="TextButton"  DataField="LeadFullName">
                    </telerik:GridBoundColumn>
                    
                </Columns>
 
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="PersonID" Name="Orders" Width="100%">                      
                        <Columns>
                            <telerik:GridBoundColumn SortExpression="short_description" HeaderText="short_description" HeaderButtonType="TextButton"
                                DataField="short_description">
                            </telerik:GridBoundColumn>                          
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                
            </MasterTableView>
        </telerik:RadGrid>

 

           protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (!e.IsFromDetailTable)
            {
                RadGrid1.DataSource = GetList();
            }
        }
 
        protected void RadGrid1_DetailTableDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            switch (e.DetailTableView.Name)
            {
                case "Orders":
                    {
                        int PersonID = Convert.ToInt32(dataItem.GetDataKeyValue("PersonID").ToString());
                        e.DetailTableView.DataSource = Claimant.GetDocuments(PersonID);
                        break;
                    }               
            }
        }

Tonya
Top achievements
Rank 1
 answered on 24 Sep 2015
1 answer
244 views

Hello,

Scenario: In radgrid,

1. Frozen columns is set to 3

2. <Scrolling AllowScroll="true" SaveScrollPosition="true"  />

3. ColumnResizing : <Resizing ClipCellContentOnResize="false" AllowColumnResize="True" EnableRealTimeResize="false" ResizeGridOnColumnResize="false" AllowResizeToFit="true"></Resizing>

In the below mentioned server side event, when I set the HeaderStyle.Width of a clolumn, the Frozen column stops working in all browsers 

Protected Sub dgEscrow_PreRender(sender As Object, e As EventArgs)
 
       Dim visibleCols As Int32 = 0
       Dim lstIndex As New List(Of Integer)
       For Each col As GridColumn In dgEscrow.MasterTableView.Columns
           If col.Visible Then
               visibleCols = visibleCols + 1
               lstIndex.Add(col.OrderIndex)
           End If
       Next
       Dim lastVisibleCol As GridColumn = dgEscrow.MasterTableView.GetColumn(dgEscrow.MasterTableView.Columns(lstIndex(visibleCols - 1) - 2).UniqueName)
       lastVisibleCol.HeaderStyle.Width = Unit.Pixel(137)
 
       ''dgEscrow.MasterTableView.Columns(lstIndex(visibleCols - 1) - 2).HeaderStyle.Width = Unit.Pixel(137)
       'dgEscrow.MasterTableView.Columns(lstIndex(visibleCols - 1) - 2).ItemStyle.Width = Unit.Pixel(137)
 
   End Sub

Can you please suggest by which I can solve this problem

Please reply at the earliest because I need to provide the fix..

 

 

 

Pavlina
Telerik team
 answered on 23 Sep 2015
1 answer
159 views

Recently, I have seen a Telerik ASP.NET AJAX VSExtensions on visualstudiogallery.msdn.microsoft.com.

Can I use it for a internal project, non commercial and without trial 30 days ?

 

Thanks !

Pavlina
Telerik team
 answered on 23 Sep 2015
7 answers
400 views

I have created an HTML chart bound to a SQL data source. Following a client-side exampleI have added an event handler which echoes the value of the bar show in the attached file.

 When I click on the indicated bar an alert pops up telling me the value is "5".

What I really want is the is the X axis value, which in this case is "1920".

The purpose will then be re-direct to a different URL with this number in the query string.

 

function OnSeriesClick(args) {
    alert("Click! Value=" + args.value);
 
}

 

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" DataSourceID="SqlDataSource1" Width="660px">
    <ClientEvents OnSeriesClick="OnSeriesClick" OnLegendItemClick="OnLegendItemClick"  />
    <PlotArea>
        <CommonTooltipsAppearance Shared="true">
            <SharedTemplate>
                  <div>Composed in decade beginning #= category #</div>
                     # for (var i = 0; i < points.length; i++) { #
                    <div>#: points[i].series.name#: #: points[i].value #</div>
                         # } #
            </SharedTemplate>
        </CommonTooltipsAppearance>
        <Series>
            <telerik:ColumnSeries DataFieldY="songs" Name="Songs">
            </telerik:ColumnSeries>
        </Series>
        <XAxis DataLabelsField="date_range">
            <LabelsAppearance RotationAngle="75" />
            <TitleAppearance Text="Decade" />
            <MajorGridLines Visible="false"></MajorGridLines>
            <MinorGridLines Visible="false"></MinorGridLines>
          </XAxis>
       <YAxis>
<%--            <TitleAppearance Text="Count" />--%>
        <MajorGridLines Visible="true" Color="#ffc5bf" Width="1"></MajorGridLines>
            <MinorGridLines visible="false"></MinorGridLines>
                   </YAxis>
    </PlotArea>
    <Legend>
        <Appearance Visible="false" />
    </Legend>
    <ChartTitle Text="Songs by Decade">
        <Appearance BackgroundColor="White" Visible="True">
        </Appearance>
         
    </ChartTitle>
</telerik:RadHtmlChart>
        <div class="admin_activity_toolbar">
        <telerik:RadToolBar ID="ToolBar" Runat="server" OnButtonClick="ToolBar_ButtonClick" Orientation="Vertical" Width="120px">
            <Items>
                <telerik:RadToolBarButton runat="server" Text="Done" Value="done">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton runat="server" Text="Button 2" IsSeparator="True">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton runat="server" Text="Pivot" Value="pivot" Enabled="False">
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>

 

Tomica
Top achievements
Rank 2
 answered on 23 Sep 2015
1 answer
134 views

From what I have tried, it appears that you cannot set the width and height of many of the Telerik controls using CSS which makes it very difficult to create responsive sites.

 Is there a way to actually do this or is this a pipe dream?

Vessy
Telerik team
 answered on 23 Sep 2015
5 answers
208 views
Hi,

I currently have a couple of RadDatePickers in a GridBoundColumn's FilterTemplate section.  I'm using the ClientEvents-OnDateSelected on both RadDatePickers to call a JavaScript function.  

ClientEvents-OnDateSelected="DateSelected"
 
function DateSelected(sender, args) {
   ...
}


In the JavaScript event that's called by the RadDatePickers I need the name of the column that the RadDatePicker which called the event is in.  Any idea how I can get this?

Cheers,

Adam
Rajan
Top achievements
Rank 1
 answered on 23 Sep 2015
2 answers
55 views

Hi,

I use 2015.1.401.

Why does the AppointmentCreated event fire AFTER the Page_PreRender?  I want to get a count of certain Appointments and it seems like the perfect place for that is in AppointmentCreated (where I already have alot of other appointment related logic).  And then in Page_PreRender I want to use those counts to write out a label to the user to give them some statistics about their appointments.

Is there a different event I can use?

Thanks,
Brent

Brent Hetland
Top achievements
Rank 1
 answered on 23 Sep 2015
3 answers
127 views
Different design depending if I used Lightweight Rendering or Classic Rendering.
Different icons and padding in the tree is incorrect....
I use Skin="Office2010Blue" in both images
Vessy
Telerik team
 answered on 23 Sep 2015
18 answers
5.9K+ views

In a very strange behavior, Only two Radwindows takes an infinite time to load (I am heavily using RadWindows in my application) , on client machine I always refresh the browser and clear the cache in trials to open the window, after monitoring the network traffic I found the window stuck loading the WebResource 

This request gives me pending 

https://pro.diwan.gov.qa/iPortal/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9214a1c3-8738-493c-985f-e961f0344b70%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2013.3.1015.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3aac331549-681c-4402-9fb7-09ec3c579ee8%3a16e4e7cd%3af7645509%3a24ee1bba%3a52af31a4%3a874f8ea2%3a92fe8ea0%3afa31b949%3adc7e0bd%3a1569bb5f%3a63b115ed%3a1c565fc%3a8547b8b2%3a30f1f089%3af46195d3%3a19620875%3a490a9d4e%3aa675b4ab%3aed16cbdc%3a88144a7a

 

and This is the anatomy for one page

<%@ Page Title="" Language="C#" MasterPageFile="~/RadPopupMasterPage.master" AutoEventWireup="true"
    CodeFile="AddEditMeetingItemEx.aspx.cs" Inherits="Meeting_AddEditMeetingItemEx" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .uploaded-files
        {
            padding: 10px;
            width: 95%;
            height: 100%;
            border-radius: 10px;
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            background: #e7f9ff;
            font-size: 12px; /*float: right;*/
            position: relative;
            margin: 2px;
        }
        .style4
        {
            width: 2%;
        }
        .style5
        {
            width: 50%;
            vertical-align: top;
            padding-top: 15px;
        }
        .TDlabelInpWithBorderAndBackground
        {
            /*border: 1px solid #6e86a0;*/
            background-color: #f5f5f5;
            vertical-align: top;
            padding-top: 15px; /*overflow: hidden;
            display: inline-block;*/
            white-space: nowrap;
            width: 8% !important;
            height: 100% !important;
        }
        .RadAjaxPanel
        {
            display: inline !important;
        }
         
        .RadAjaxPanel > table
        {
            display: block !important;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" runat="Server">
    <input id="hdnRadWinCaller" type="hidden" runat="server" name="hdnRadWinCaller" value="0" />
    <input id="hdnEditMeetingPageCall" type="hidden" runat="server" name="hdnEditMeetingPageCall"
        value="0" />
    <input id="hdnMeetingItemsExID" runat="server" type="hidden" name="hdnMeetingItemsExID"
        value="-1" />
    <input id="hdnDocID" runat="server" type="hidden" name="hdnDocID" value="-1" />
    <input id="hdnMeetingID" runat="server" type="hidden" name="hdnMeetingID" value="-1" />
    <input id="hdnDocFilesIDs" runat="server" type="hidden" name="hdnDocFilesIDs" value="" />
    <input id="RefreshMainPage" type="hidden" value="0" name="RefreshMainPage" />
    <input type="hidden" id='hdnMainPageCall' runat="server" name='hdnMainPageCall' value="0" />
    <input id="hdnAddedToTrackingTable" runat="server" type="hidden" name="hdnAddedToTrackingTable"
        value="-1" />
    <table id="tblContainer" cellspacing="0" cellpadding="0" width="100%" height="100%" align="center"
        border="0" dir='<%#Session["PageDir"]%>' style="background-color: #ffffff" align='<%#Session["AlignDir"]%>'>
        <tr>
            <td width="100%" dir='<%#Session["PageDir"]%>' align='<%#Session["AlignDir"]%>'>
                <table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse;
                    margin: 5px; height: 100%; width: 100%;">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td class="TDlabelInp TDlabelInpWithBorderAndBackground">
                                        <%#m_strSubject%>
                                    </td>
                                    <td class="TDEntryInp" style="vertical-align: top; padding-top: 15px; padding-right: 15px;
                                        padding-left: 15px; width: 38% !important">
                                        <asp:RequiredFieldValidator Display="Dynamic" ControlToValidate="TxtBxMeetingSubject"
                                            ID="ReqMeetingSubject" ErrorMessage='<%#m_strReqField%>' runat="server"></asp:RequiredFieldValidator>
                                        <asp:TextBox ID="TxtBxMeetingSubject" runat="server" CssClass="Editbox" Width="90%"></asp:TextBox>
                                    </td>
                                    <td class="TDlabelInp TDlabelInpWithBorderAndBackground">
                                        <%#m_strAttach%>
                                    </td>
                                    <td style="width: 46% !important" class="TDlabelInp">
                                        <div class="uploaded-files">
                                            <table style="width: 100%;" dir='<%#Session["PageDir"]%>' cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td style="width: 50%; vertical-align: top; padding-top: 15px;">
                                                        <telerik:RadAsyncUpload Font-Size="Medium" ID="RadAsyncUpload1" dir='<%#Session["PageDir"]%>'
                                                            OnClientFilesUploaded="OnClientFilesUploaded" OnClientFileUploading="OnClientFileUploading"
                                                            OnClientFileUploadFailed="OnClientFileUploadFailed" runat="server" MultipleFileSelection="Automatic"
                                                            Width="97%" PostbackTriggers="btnSave" Height="16px" InputSize="25">
                                                        </telerik:RadAsyncUpload>                                                      
                                                    </td>
                                                    <td>
                                                        <asp:Panel runat="server" ID="pnlAttachments">
                                                            <asp:Literal runat="server" ID="ltrNoResults" Visible="True" />
                                                            <asp:Repeater runat="server" ID="Repeater1">
                                                                <HeaderTemplate>
                                                                    <h3 class="TDlabelInp">
                                                                        <%# m_strCurrentAttachs%></dt>
                                                                    </h3>
                                                                    <ul>
                                                                </HeaderTemplate>
                                                                <FooterTemplate>
                                                                    </ul></FooterTemplate>
                                                                <ItemTemplate>
                                                                    <li>
                                                                        <%# "<div style='display:inline'><a onclick=\"javascript:OpenExternal('" +   DataBinder.Eval(Container.DataItem, "FileWebPath").ToString()  + "');\" href='#'>"+
                                                    DataBinder.Eval(Container.DataItem, "FileName").ToString() + "</a>" +
                                                     "<input type='checkbox'  id='" + DataBinder.Eval(Container.DataItem, "DocFileID").ToString() + "' onclick='CheckDeleletedFile(this);' name='deleteAttatchment'>"+
                                                     "<label for='" + DataBinder.Eval(Container.DataItem, "DocFileID").ToString() + "'>"+m_strDelete+"</label></div>"
                                                                        %>
                                                                    </li>
                                                                </ItemTemplate>
                                                            </asp:Repeater>
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                              
                        </td>
                    </tr>
                    <tr style="height: 60%">
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td class="TDlabelInp TDlabelInpWithBorderAndBackground">
                                        <%#m_strDetails%>
                                    </td>
                                    <td style="height: 100%; text-align: center; width: 92%; vertical-align: top; padding-left: 15px;
                                        padding-right: 15px;">
                                        <div style="width: 100%; height: 100%; overflow: visible;">
                                            <telerik:RadEditor ID="TxtBxDetailsCKEditor" Width="100%" Height="600" runat="server"
                                                AllowScripts="false" ContentAreaMode="Div" RenderMode="Native" EditModes="Design"
                                                ToolbarMode="RibbonBar" ToolsFile="~/Common/Telerik/RadEditor/FullSetOfTools.xml">
                                            </telerik:RadEditor>                                           
                                            <telerik:RadAjaxManager ID="MeetingItemsRadAjaxManager" runat="server" OnAjaxRequest="MeetingItemsRadAjaxManager_AjaxRequest">
                                                <AjaxSettings>
                                                    <telerik:AjaxSetting AjaxControlID="MeetingItemsRadAjaxManager">
                                                        <UpdatedControls>
                                                            <telerik:AjaxUpdatedControl ControlID="pnlAttachments" />
                                                            <telerik:AjaxUpdatedControl ControlID="hdnDocFilesIDs" />
                                                        </UpdatedControls>
                                                    </telerik:AjaxSetting>
                                                </AjaxSettings>
                                                <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
                                            </telerik:RadAjaxManager>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr valign="top" width="100%" style="height: 100%" align='center'>
            <td style="height: 100%; vertical-align: middle; background-color: #f5f5f5">
                <asp:ImageButton ID="btnAddToTrackTable" CssClass="btnAddToTrackTable" Visible="false"
                    runat="server" OnClientClick="AddToTrackTable(); return false;"></asp:ImageButton><img
                        height="1" src="" width="5">
                <asp:ImageButton ID="btnConvertToTask" Visible="false" runat="server" CssClass="btnConvert"
                    OnClientClick="return SendTask(); "></asp:ImageButton><img height="1" src="" width="5">
                <asp:ImageButton ID="btnSave" OnClientClick="Page_ClientValidate();if(Page_IsValid)DisablePage();"
                    runat="server" CssClass="btnSave" OnClick="btnSave_Click"></asp:ImageButton><img
                        height="1" src="" width="4">
                <asp:ImageButton ID="btnClose" runat="server" OnClientClick="ClientClosePopupWithoutSubmit();" />
            </td>
        </tr>
    </table>   
    <div style="display: none">
        <input id="btnOkay" value="Done" type="button" onclick='SubmitOnParent();' />
        <input id="btnCancel" value="Cancel" type="button" />
    </div>
    <asp:Literal ID="MsgLit" runat="server"></asp:Literal>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        <span>
            <%=m_strAttachmentsLoaing%>
        </span>
        <br />
        <img src="../Common/Img/loadingAnimation.gif" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <script type="text/javascript">
 
        var AjaxIsActive = false;
 
        function OnClientFileUploading(sender, args) {
            DisableControls();
        }
 
        function OnClientFileUploadFailed(sender, args) {
            args.set_handled(true);
            alert(args.get_message());
            EnableControls();
        }
 
        function OnClientFilesUploaded(sender, args) {
            EnableControls();
        }
 
 
        function pageLoad(sender, eventArgs) {
            if (!eventArgs.get_isPartialLoad()) {
                $find("<%# MeetingItemsRadAjaxManager.ClientID %>").ajaxRequest("LoadAttachments");
            }
 
            var upload = $find("<%# RadAsyncUpload1.ClientID%>");
            if (upload != null && upload != undefined) {
                var obj = $telerik.$(".ruCancel", upload.get_element());
                if (obj != null && obj != undefined) {
                    $(document).bind("click", obj, function () {
                        // Sherif we should check that no upload/download in progress
                        var uploadingRows = $(".RadAsyncUpload").find(".ruUploadProgress");
                        if (uploadingRows != null && uploadingRows != undefined) {
                            if (AjaxIsActive == false && uploadingRows.length <= 0)
                                EnableControls();
                        }
                    });
                }
            }
 
        }
 
        function cnovertToTaskCallBack(arg) {
 
            $(".btnConvert").css("visibility", "hidden");
            GetRadWindow().BrowserWindow.refreshGrid('navigateToInserted');
            return;
        }
        function GetRadWindow()   //Get reference to window   
        {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function OpenExternal(strFile) {
            window.open(strFile);
        }
        function ClientClosePopupWithoutSubmit() {
            if (document.getElementById('<%#hdnMainPageCall.ClientID%>') != null && document.getElementById('<%#hdnMainPageCall.ClientID%>').value == "1")
                parent.parent.GB_hide();
 
            else if (document.getElementById('<%#hdnEditMeetingPageCall.ClientID%>') != null && document.getElementById('<%#hdnEditMeetingPageCall.ClientID%>').value == "1"
                        && document.getElementById('<%#hdnRadWinCaller.ClientID%>') != null && document.getElementById('<%#hdnRadWinCaller.ClientID%>').value == "1")
                GetRadWindow().close();
 
            else if (document.getElementById('<%#hdnRadWinCaller.ClientID%>') != null && document.getElementById('<%#hdnRadWinCaller.ClientID%>').value == "1")
                GetRadWindow().close();
 
            else if (document.getElementById('<%#hdnEditMeetingPageCall.ClientID%>') != null && document.getElementById('<%#hdnEditMeetingPageCall.ClientID%>').value == "1")
                window.parent.jQuery('#PopupDiv').dialog('close');
            else
                GetRadWindow().close();
        }
        function DeleteDocFile(FileID) {
            document.getElementById('<%#hdnDocFilesIDs.ClientID%>').value = FileID;
            SubmitOnParent();
        }
        function CheckDeleletedFile(checkObj) {
            var strFileID = checkObj.id;
            if (!checkObj.checked) {
                document.getElementById('<%#hdnDocFilesIDs.ClientID%>').value += strFileID + ',';
            }
            else {
                var strTemp = new String();
                strTemp = document.getElementById('<%#hdnDocFilesIDs.ClientID%>').value;
                if (strTemp.indexOf(strFileID + ',') != -1)
                    document.getElementById('<%#hdnDocFilesIDs.ClientID%>').value = strTemp.replace(strFileID + ',', '');
            }
        }
        function SendTask() {
            var strURL = '../../Correspondence/SendTask.aspx?DocID=' + document.getElementById('<%#hdnDocID.ClientID%>').value + '&DocHisID=-1&docViewCall=3&AddRootDocHis=1&meetingCall=1';                       
            var oManager = GetRadWindowManagerFromParent();
            var oWnd = oManager.open(strURL, "ExplorerWindow");
            var pWidth = oWnd.BrowserWindow.window.innerWidth == undefined || "" ? document.documentElement.clientWidth : oWnd.BrowserWindow.window.innerWidth;
            var pHeight = oWnd.BrowserWindow.window.innerHeight == undefined || "" ? document.documentElement.clientHeight : oWnd.BrowserWindow.window.innerHeight;
            oWnd.setSize((pWidth * 0.95), (pHeight * 0.95)); //Width, Height
            oWnd.__parentBackRefrence = window;
            oWnd.center();
            oWnd.set_title('<%#m_strConvertToTask%>');
            window.setTimeout(function () {               
                oWnd.setActive(true);               
            }, 0);
 
            return false;
        }
        function OnSendTaskClientClose(oWnd, args) {
            var arg = args.get_argument();
            if (arg && arg.retVal == "1") {
                if (arg.closeParent != null && arg.closeParent == "0") {
                    if (arg.hdnDocID != null)
                        document.getElementById('<%#hdnDocID.ClientID%>').value = arg.hdnDocID;
                    var MasterFormObj = document.getElementById('<%#myMasterPage.MasterMainForm.ClientID%>');
                    MasterFormObj.submit();
                }
                else parent.parent.GB_hide();
            }
        }
        function SubmitOnParent() {
 
            if (document.getElementById('RefreshMainPage') != null && document.getElementById('RefreshMainPage').value == '1')
                SubmitAllPage();
        }
        function SubmitAllPage() {
            var MasterFormObj = document.getElementById('<%#myMasterPage.MasterMainForm.ClientID%>');
            MasterFormObj.submit();
 
        }
 
        function GetRadWindowManagerFromParent() {
            var parentPage = GetRadWindow().BrowserWindow;
            var oManager = parentPage.GetRadWindowManagerFromParent();
        }
        var maXzIndex = 100000;
        function AddToTrackTable() {
 
            var bAddToTrackingTable = document.getElementById('<%#hdnAddedToTrackingTable.ClientID%>').value;
            if (bAddToTrackingTable === "1") {
                GetRadWindow().BrowserWindow.AddTrackTableItem(3, document.getElementById('<%#hdnDocID.ClientID%>').value, document.getElementById('<%#hdnMeetingItemsExID.ClientID%>').value, HandleTrackTableClose);
                return;
            }
 
            var oManager = GetRadWindowManagerFromParent();
            var oWndTrackTableSel = oManager.open("../Track/TrackTableSelections.aspx", "RadWindow_TrackTableSelections");
            oWndTrackTableSel.setSize(screen.width * 0.4, screen.height * 0.30); //Width, Height
            oWndTrackTableSel.center();           
            oWndTrackTableSel.set_title('<%#m_strAddUpdateTrackTableItem%>');
            window.setTimeout(function () {
                oWndTrackTableSel.setActive(true);               
            }, 0);
        }
        //***********************************8
        function HandleTrackTableSelectionsClose(oWnd, args) {
            //get the transferred arguments
            var arg = args.get_argument();
            if (arg && arg.retVal == "1") {
                //  calling AddTrackTableItem from the parent meeting window to get the tracktable page maximum size
                // and pass 3 for meeting item
                var oWnd = GetRadWindow().BrowserWindow.AddTrackTableItem(3, document.getElementById('<%#hdnDocID.ClientID%>').value, document.getElementById('<%#hdnMeetingItemsExID.ClientID%>').value/*, HandleTrackTableClose*/);
                oWnd.__parentBackRefrence = window;
            }
            else if (arg && arg.retVal == "2") {
                //  calling SearchTrackTable from the parent meeting window to get the tracktable page maximum size
                var oWnd = GetRadWindow().BrowserWindow.SearchTrackTable(document.getElementById('<%#hdnDocID.ClientID%>').value/*, HandleTrackTableClose*/);
                oWnd.__parentBackRefrence = window;
            }
        }
        var radAjaxManager;
        //*******************************
        function HandleTrackTableClose(window, args) {
            if (radAjaxManager == null)
                radAjaxManager = $find("<%# MeetingItemsRadAjaxManager.ClientID %>");
 
            radAjaxManager.ajaxRequest('CheckMeetingItemAddedToTrackingTable');
 
        }
 
        function EnableControls() {
 
            var btnSave = $(".btnSave");
            var btnAddToTrackTable = $(".btnAddToTrackTable");
            var btnConvertToTask = $(".btnConvert");
 
            if (btnSave != null && btnSave != undefined)
                btnSave.removeAttr("disabled");
 
            if (btnAddToTrackTable != null && btnAddToTrackTable != undefined)
                btnAddToTrackTable.removeAttr("disabled");
 
            if (btnConvertToTask != null && btnConvertToTask != undefined)
                btnConvertToTask.removeAttr("disabled");
        }
 
        function DisableControls() {
 
            var btnSave = $(".btnSave");
            var btnAddToTrackTable = $(".btnAddToTrackTable");
            var btnConvertToTask = $(".btnConvert");
 
            if (btnSave != null && btnSave != undefined)
                btnSave.attr("disabled", 'true');
 
            if (btnAddToTrackTable != null && btnAddToTrackTable != undefined)
                btnAddToTrackTable.attr("disabled", 'true');
 
            if (btnConvertToTask != null && btnConvertToTask != undefined)
                btnConvertToTask.attr("disabled", 'true');
        }
 
        function DisablePage() {
            var pageLoadingPanel = $find('<%# RadAjaxLoadingPanel2.ClientID %>');
            pageLoadingPanel.show('tblContainer');
        }
        function RequestStart(sender, args) {
            if (!AjaxIsActive) {
                AjaxIsActive = true;
            }
 
            if (args.get_eventArgument() == "LoadAttachments") {
                currentLoadingPanel = $find("<%# RadAjaxLoadingPanel1.ClientID %>");
                currentUpdatedControl = "<%# pnlAttachments.ClientID %>";
                DisableControls();
                //show the loading panel over the updated control
                currentLoadingPanel.show(currentUpdatedControl);
            }
            else {
                currentLoadingPanel.hide();
            }
        }
        function ResponseEnd(sender, args) {
            AjaxIsActive = false;
            //hide the loading panel and clean up the global variables
            if (args.get_eventArgument() == "LoadAttachments") {
 
                currentLoadingPanel.hide(currentUpdatedControl);
                EnableControls();
            }
        }
    </script>
</asp:Content>

 

Ivan Danchev
Telerik team
 answered on 23 Sep 2015
8 answers
503 views
I am showing a rad alert by calling the javascript function "radalert(..,..,..,)" ,but it gives me the error "radalert is not defined".i have RadScriptManager and RadWindowManager in the page.the page is anonymous.how can i make it work.

Thanks,
Rahul R
Andrea
Top achievements
Rank 2
 answered on 23 Sep 2015
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?