Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
128 views
Hello,

I have created a simple example, to utilize the loading panel on a RadWindow. On my current apps, when I called EditCancel(), the RadWindow closed properly. But not on this example. I am sure it's probably just some simple setting that I forgot. I just couldn't figure it out which one. Could you help?

Thanks in advance.

Tri

Master Page:

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!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></title>
<asp:ContentPlaceHolder id="head" runat="server">Header
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>

Main Page:

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="PgMain.aspx.vb" Inherits="PgMain" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script language="javascript" type="text/javascript">
function ShowEditForm(pageUrl, id, iWidth, iHeight) {
var nWindow = window.radopen(pageUrl + ".aspx?id=" + id, "UserListDialog");
nWindow.setSize(iWidth, iHeight);
nWindow.center();
nWindow.modal = true;
nWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
nWindow.show();
return false;
}
</script>
</telerik:RadCodeBlock>
<div>
<asp:Button ID="lbn" runat="server" Text="Load Window" OnClientClick="return ShowEditForm('PgWindow', 0, 500, 500);" />
</div>
<telerik:RadWindowManager ID="WinMgr" runat="server" Skin="WebBlue" KeepInScreenBounds="true"
Style="z-index: 7100;">
<Windows>
<telerik:RadWindow ID="UserListDialog" runat="server" Behaviors="Close, Move" Height="300px"
Left="10px" Modal="true" ReloadOnShow="true" Skin="WebBlue" Opacity="100" Title="User List Dialog"
Top="10px" Width="500px" KeepInScreenBounds="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</asp:Content>

Window Page:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="PgWindow.aspx.vb" Inherits="PgWindow" %>

<!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></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadCodeBlock ID="rcb1" runat="server">
<script type="text/javascript">
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}

function CancelEdit() {
alert('Should be closing!');
GetRadWindow().Close();
}

</script>
</telerik:RadCodeBlock>
<div>
<asp:Panel ID="pnl" runat="server" Height="400">
Just testing
</asp:Panel>
<asp:Button ID="btnClose" runat="server" Text="Process ..." />
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btnClose">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="pnl" UpdatePanelCssClass="" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
</form>
</body>
</html>



Tri Nguyen
Top achievements
Rank 1
 answered on 03 Oct 2014
1 answer
135 views
Hello, I'm trying to add a Split Button to a standard asp.net DataGrid. I'd like to be able to handle the ItemCommand event to response to clicks on the button or associated menu item. Is this possible? Can I somehow make the menu click change the CommandName of the associated button?
Danail Vasilev
Telerik team
 answered on 03 Oct 2014
11 answers
3.0K+ views
Hi,

I am using below code to find out values of filtered column's "filter value" and "function name" but it's not working in my page.

foreach (GridColumn item in RadGrid1.MasterTableView.Columns)
{
        string filterFunction = item.CurrentFilterFunction.ToString();
        string filterValue = item.CurrentFilterValue;
}

I want to save these two values in DB for future use. Please help me...

Thanks,
Viktor Tachev
Telerik team
 answered on 03 Oct 2014
1 answer
85 views
Rotator not working properly..... when mouse over the slide it gets shake and rotating.
Slav
Telerik team
 answered on 03 Oct 2014
6 answers
153 views
Hi,

I have a page with multi XmlhttpPanels, including a parent panel and a number of children panels which are placed inside an asp repeater. The error happens when run set_value() for any children panel. I have set the script manager to the standard asp script manager on the page, and the EnableClientScriptEvaluation is set to true in the parent panel. Not sure if xmlhttppanel supports nesting. All works fine if I remove the parent panel.  

The below is the error screenshot and the code. Any help would be much appreciated.

<telerik:RadXmlHttpPanel runat="server" ID="pnlRoom" OnServiceRequest="pnlRoom_ServiceRequest"
    EnableClientScriptEvaluation="true" LoadingPanelID="RadAjaxLoadingPanel1" RenderMode="Block">
    <asp:Repeater runat="server" ID="rptGroups" OnItemDataBound="rptGroups_ItemDataBound"
        ClientIDMode="AutoID">
        <ItemTemplate>
            <fieldset class="fieldsetBlock1">
                <div class="fieldsetTitle">
                    <%# Eval("GROUP_NAME")%>   
                </div>
                <telerik:RadXmlHttpPanel runat="server" ID="pnlGroup" OnServiceRequest="pnlGroup_ServiceRequest"
                    RenderMode="Block">
                    <asp:Repeater ID="rptItems" runat="server" EnableViewState="false" ClientIDMode="AutoID">
                        <HeaderTemplate>
                            <table width="574px" class="hor-minimalist-b">
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="padding: 12px 8px;">
                                    <a href="javascript:;" onclick='<%# string.Format("openItem(this,{0},0);", Eval("JOB_ITEM_ID")) %>'
                                        class="a-job-item">
                                        <%# Eval("ItemSummary") %></a>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </tbody> </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <div class="divAddNewLinkButton">
                        <a href="javascript:;" onclick='<%# string.Format("openItem(this,0,{0});", Eval("JOB_ITEM_GROUP_ID")) %>'>
                            <span>✚</span>  New Item</a></div>
                </telerik:RadXmlHttpPanel>
            </fieldset>
        </ItemTemplate>
        <SeparatorTemplate>
            <br />
        </SeparatorTemplate>
    </asp:Repeater>
</telerik:RadXmlHttpPanel>
Slav
Telerik team
 answered on 03 Oct 2014
1 answer
258 views
I have configured my RadGrid to call a client side function and call an AJAX script to insert records into my dB. 
I am successful at calling my Client Side JS function by utilizing the <clientevents onrowclick=RowClick> event.

<ClientEvents OnRowClick="RowClick" />  *** This works but it is not my ideal solution

 I would like to call this function by the execution of the onblur event from a textbox control.

I have tried the code below but I am not having any luck:
<telerik:GridTemplateColumn HeaderText="Qty" AllowFiltering="false" UniqueName="Column2">
<ItemTemplate>
<telerik:RadTextBox ID="qty" runat="server" AutoPostBack="True">
<ClientEvents OnBlur="function(sender,args){RowClick(sender,args)}" />
</telerik:RadTextBox>
</ItemTemplate>
</telerik:GridTemplateColumn>

However, when I execute the Onblur event I get this error:   

JavaScript runtime error: Object doesn't support property or method 'get_id'

I assume that this is due to the fact that it doesn't know the ROW id when inside of the textbox?

Any help is appreciated!
Viktor Tachev
Telerik team
 answered on 03 Oct 2014
1 answer
106 views
I would like to confirm if Rad Compression can be used in a Load Balancer and Web Farm environment . Can this be done and/or are there any known issues when doing this?
Angel Petrov
Telerik team
 answered on 03 Oct 2014
10 answers
179 views
We have a pivotgrid that isn't working correctly. The data comes from a stored procedure that de-normalizes a bunch of data, so that users can do ad-hoc querying on the results. The table can run into several hundred thousand rows.

This used to work correctly, but recently (perhaps with the q2 2014 update?) we've noticed issues. Drag a column into the row columns group, wheel spins, eventually the original table returns with no column breakdown. Sometimes (not consistently) we can get it to work by right-clicking, selecting 'Move to COLUMN field', generate, then right-click and move to row field.

We were using Ajax on the grid, tried removing that with no change. We've tried deferring the layout update, no difference. It seems the columns that cause the issue are usually text columns, but there is no error thrown and nothing reported on screen, just no column breakdown.

The frustrating thing is this used to work, and neither code or data has changed. Here's the code used to generate the pivot. The data source is an objectdatasource, using a query running against SQL Server.

<telerik:RadPivotGrid ID="pivotData" runat="server" AggregatesLevel="-1" AggregatesPosition="Columns"
        DataSourceID="dsExpenditures"
        ShowColumnHeaderZone="False" ShowDataHeaderZone="False" ShowRowHeaderZone="False" EnableConfigurationPanel="true"
        Skin="Metro">
        <Fields>
            <telerik:PivotGridAggregateField Caption="Total Spend" DataField="TotalSpend" UniqueName="TotalSpend"
                DataFormatString="{0:n2}">
            </telerik:PivotGridAggregateField>
        </Fields>
        <ConfigurationPanelSettings LayoutType="OneByFour" Position="Left" DefaultDeferedLayoutUpdate="true">
        </ConfigurationPanelSettings>
    </telerik:RadPivotGrid>
Maria Ilieva
Telerik team
 answered on 03 Oct 2014
1 answer
108 views
Hello,
i want to implement the OnDataBound event of a RadGrid in the client side but the sender is always returning null. Also i tried $find("<%GridId.ClientID%>") but also  not working .
i can't find the reason of this problem and how can i resolve it. Any help please??
Konstantin Dikov
Telerik team
 answered on 03 Oct 2014
0 answers
103 views
I am trying to follow the ajax tutorial at wschools.com. However when I copy and paste this code it does not work:

<!DOCTYPE html>
<html>
<head>
<script>
function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send();
}
</script>
</head>
<body>

<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="loadXMLDoc()">Change Content</button>

</body>
</html>





Martin
Top achievements
Rank 1
 asked on 03 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?