Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
81 views
I am trying to show a context menu on mouse over of an image control.

Below is my code

           
Dim ControlsContainer As New Panel
           Dim InfoIcon As New Image
           Dim InfoContextMenu As New RadContextMenu
           Dim mi As New RadMenuItem
 
 
 
 
 
 
           ControlsContainer.ID = "pnlInfoContainer"
 
 
 
 
           InfoIcon.ID = "InfoImageIcon"
           InfoIcon.ImageUrl = "/mb/admin/images/plus.png"
           InfoIcon.Attributes.Add("onmouseover", "ShowInfoMenuOnLeftClick();")
 
 
 
 
           InfoContextMenu.ID = "mb_InfoContents_ContentextMenu"
           InfoContextMenu.ClientIDMode = System.Web.UI.ClientIDMode.Static
 
 
 
 
           mi.Text = "Home"
           InfoContextMenu.Items.Add(mi)
 
 
 
 
           ControlsContainer.Controls.Add(InfoIcon)
           ControlsContainer.Controls.Add(InfoContextMenu)
 
 
 
 
           Dim script As String = "<script type=""text/javascript""> function ShowInfoMenuOnLeftClick(sender, args) {     var contextMenu = $find('mb_InfoContents_ContentextMenu'); console.log(contextMenu); contextMenu.show(args); } </script>"
           If Not Me.Page.ClientScript.IsStartupScriptRegistered("InfocontentsMenu") Then
               Me.Page.ClientScript.RegisterStartupScript(Me.Page.GetType, "InfocontentsMenu", script)
           End If
 
 
           Me.Controls.Add(ControlsContainer)
 
 
 
 
           Dim MenuTargetConfiguration As New ContextMenuControlTarget()
           MenuTargetConfiguration.ControlID = "InfoImageIcon"
           InfoContextMenu.Targets.Add(MenuTargetConfiguration)



I am getting a java script error with this code..

  1. Uncaught TypeError: Cannot read property 'target' of undefined Telerik.Web.UI.WebResource.axd:4660
    1. ShowInfoMenuOnLeftClickindex.aspx:560
    2. onmouseover

Can you help me!!
Boyan Dimitrov
Telerik team
 answered on 07 Nov 2012
1 answer
91 views
Scenario:

Grid in Conditional Update Panel
Within a UserControl
On a SiteFinity Page
Custom Export Buttons within the PagerTemplate.

Events are not firing on the server side as I cannot declaratively add the Event Triggers.
Cannot use script mananger as it's on the SiteFinity Page not in this control

Events fire on the Client Side but do nothing when executed.

Clinet code is straightforward enough but does not error or work

function onClientExcelExportCommand(sender, eventArgs) {

    var tableView = $find("<%= TransactionListGrid.ClientID %>").get_masterTableView();

     tableView.exportToExcel();

}

Help is required.

Many thanks

Kostadin
Telerik team
 answered on 07 Nov 2012
1 answer
82 views
Hello,

I have a RadGrid with 4 template columns.
1. ASP:TextBox
2. RadEditor
3. ASP:LinkButton (ADD)
4. ASP:LinkButton. (DELETE)

When we click on "ADD" button we are adding a new row next to the selected row. Same way we are deleting the selected row on click of "DELETE" button. This we are doing in postback by rebinding the RadGrid. We need to avoid the postback and Add/Delete rows dynamically in javascript. Please provide the solution. Please find herewith the sample code that we are doing in code behind.

FYI: we are using net framework 4.0 and the Telerik.Web.UI.dll version is v. 2011.2.915.40

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="RadGridTesting.WebForm1" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerikControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <link href="../../TelerikCSS_ETO/Grid.ETOGrid.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scrpt1" runat="server"></asp:ScriptManager>
    <div>
        <telerikControls:RadGrid ID="gvTest" runat="server" GridLines="None"
            onitemcommand="gvTest_ItemCommand"
            onneeddatasource="gvTest_NeedDataSource">
            <MasterTableView AutoGenerateColumns="false" ShowFooter="true" Width="100%" TableLayout="Auto"
                HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Bold="true"
                ViewStateMode="Enabled" ItemStyle-VerticalAlign="Middle" ExpandCollapseColumn-Display="false"
                ExpandCollapseColumn-Visible="false">
                <Columns>
                    <telerikControls:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:TextBox ID="txtsno" MaxLength="3" runat="server" Width="25px" Text='<%# Eval("sno") %>'></asp:TextBox>
                        </ItemTemplate>
                    </telerikControls:GridTemplateColumn>
                    <telerikControls:GridTemplateColumn HeaderStyle-HorizontalAlign="Left">
                        <ItemTemplate>
                            <telerikControls:RadEditor ID="txt1" runat="server" Height="25px" ToolsWidth="130px"
                                Content='<%# DataBinder.Eval(Container.DataItem, "text") %>'
                                ToolbarMode="ShowOnFocus" EditModes="Design" ContentFilters="DefaultFilters" />
                        </ItemTemplate>
                    </telerikControls:GridTemplateColumn>
                    <telerikControls:GridTemplateColumn ItemStyle-VerticalAlign="Top">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtn1" CausesValidation="false" CommandName="DELETE" Text="Delete"
                                runat="server"></asp:LinkButton>
                        </ItemTemplate>
                    </telerikControls:GridTemplateColumn>
                    <telerikControls:GridTemplateColumn ItemStyle-VerticalAlign="Top">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtn2" CausesValidation="false" CommandName="ADD" Text="Add"
                                runat="server"></asp:LinkButton>
                        </ItemTemplate>
                    </telerikControls:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerikControls:RadGrid>
    </div>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace RadGridTesting
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        List<DataText> lstList = new List<DataText>();
 
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        /// <summary>
        /// Add and remove row
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvTest_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "ADD")
            {
                GridDataItem item = (GridDataItem)((LinkButton)e.CommandSource).NamingContainer;
                lstList = BindGrid(item.ItemIndex, "Add");
                this.gvTest.Rebind();
            }
            else if (e.CommandName == "DELETE")
            {
                GridDataItem item = (GridDataItem)((LinkButton)e.CommandSource).NamingContainer;
                lstList = BindGrid(item.ItemIndex, "Delete");
                this.gvTest.Rebind();
            }
        }
 
        protected void gvTest_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (!IsPostBack)
            {
                lstList = new List<DataText> {
                                    new DataText{ sno = 1 , text = "A"},
                                    new DataText{ sno = 2 , text = "B"},
                                    new DataText{ sno = 3 , text = "C"},
                                    new DataText{ sno = 4 , text = "D"},
                                    new DataText{ sno = 5 , text = "E"}
                };
            }
            this.gvTest.DataSource = lstList;
        }
 
        private List<DataText> BindGrid(int _RowID, string opAddDelete)
        {
            lstList = new List<DataText>();
            int sno = 1;
 
            foreach (GridDataItem item in this.gvTest.Items)
            {
                RadEditor txt1 = (RadEditor)item.FindControl("txt1");
                DataText dt = new DataText();
 
                if (opAddDelete == "Delete" && item.ItemIndex == _RowID)
                {
                }
                else
                {
                    dt.sno = sno;
                    dt.text = txt1.Text;
                    lstList.Add(dt);
                    sno++;
                }
 
                if (opAddDelete == "Add" && item.ItemIndex == _RowID)
                {
                    dt = new DataText();
                    dt.sno = sno;
                    lstList.Add(dt);
                    sno++;
                }
            }
             
            return lstList;
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace RadGridTesting
{
    public class DataText
    {
        public int sno { get; set; }
 
        public string text { get; set; }
    }
}
Kostadin
Telerik team
 answered on 07 Nov 2012
0 answers
67 views
Hi,
I am trying to use the show group panel, allowing a user to drag the column names into it, however it keeps throwing an error:

"Error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid group by expression: 'Group By' clause missing"

However if I define an item in the configuration manager it works, properly, So why can't I drag and Drop? :(
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Orders.aspx.vb" Inherits="Orders" %>
<%@ 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>Work Orders</title>
</head>
<body>
 
    <form id="form2" runat="server">
           
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server">
    </telerik:RadSkinManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
        <script type="text/javascript">
            function ShowEditForm(id, rowIndex) {
                //alert("orderID" + ' ' + id);
                var grid = $find("<%= RadGrid1.ClientID %>");
                var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                grid.get_masterTableView().selectItem(rowControl, true);
                var t = document.getElementById("<%= lblTemplate.ClientID %>").value;
                //alert("row = " + rowIndex);
                var ow = window.radopen("OrderUpdate.aspx?OrderID=" + id + "&Template=" + t, "UpdateWorkOrder");
                //alert("After window open");
                ow.Maximize();
                return false;
            }
            function ShowInsertForm() {
                var t = document.getElementById("<%= lblTemplate.ClientID %>").value;
                var ow = window.radopen("OrderUpdate.aspx?OrderID=0" + "&Template=" + t + "&OrderType=R", "UpdateWorkOrder");
                //alert("After window open");
                ow.Maximize();
                return false;
            }
 
 
            function RowMouseOver(sender, eventArgs) {
                var text = "";
                text += "Work Order Description - ";
                var i = eventArgs.get_itemIndexHierarchical();
                //text += i
                //var firstDataItem = $find("<%= RadGrid1.MasterTableView.ClientID %>").get_dataItems()[0];
                //var keyValues = 'OrderID: "' + firstDataItem.getDataKeyValue("OrderID");
                //
                //<telerik:GridBoundColumn DataField="Text" HeaderText="Text" UniqueName="Text" Display="false">
                //    </telerik:GridBoundColumn>
                //text += ", OrderID: " + keyValues
                //  following 3 lines worked
                var Description = eventArgs.getDataKeyValue("Text")
                text += Description
                document.getElementById("OutPut").innerHTML = text;
 
            }
 
 
 
            function refreshGrid(arg) {
                if (!arg) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }
             
 
        </script>
    </telerik:RadCodeBlock>
    <%--<div id="header">
        <h1>
                <asp:Label ID="lblVersion" runat="server" Text="Profess Roads Cost Manager" ForeColor="White"></asp:Label>
        </h1>
    </div>--%>
    <div>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"
            ControlsToSkip="Textbox" />
        <table width="100%">
            <tr>
                <td style="width: 100%; text-align: left;">
                    <telerik:RadButton ID="chkShowAll" runat="server" Text="Show All" ButtonType="ToggleButton"
                        ToggleType="CheckBox" />
                    <telerik:RadButton ID="chkRoutine" runat="server" Text="Reactive" ButtonType="ToggleButton"
                        ToggleType="CheckBox" />
                    <telerik:RadButton ID="chkProgrammed" runat="server" Text="Proactive" ButtonType="ToggleButton"
                        ToggleType="CheckBox" />
                    <telerik:RadButton ID="chkCyclic" runat="server" Text="Cyclic" ButtonType="ToggleButton"
                        ToggleType="CheckBox" />
                    <telerik:RadButton ID="chkProject" runat="server" Text="Related by Project" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkActivity" runat="server" Text="Order Activity" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkServiceProvider" runat="server" Text="Service Provider"
                        ButtonType="ToggleButton" ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkLocation" runat="server" Text="Location" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkCategory" runat="server" Text="Order Category" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkCostCentre" runat="server" Text="Cost Centre" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                    <telerik:RadButton ID="chkAccountCode" runat="server" Text="Account Code" ButtonType="ToggleButton"
                        ToggleType="Radio" GroupName="Related" />
                </td>
                <td style="width: 100%; text-align: right;">
                    <telerik:RadButton ID="btnExport" runat="server" Text="Export" />
                </td>
                <td style="text-align: right;">
                    <asp:RadioButtonList ID="ExportFormat" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem>Excel</asp:ListItem>
                        <asp:ListItem>Word</asp:ListItem>
                        <asp:ListItem>PDF</asp:ListItem>
                        <asp:ListItem>CSV</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
        </table>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
            AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" GridLines="None"
            OnRowDataBound="NamesGridView_RowDataBound" PageSize="14"
            DataKeyNames="OrderId" ShowGroupPanel="True" CellSpacing="0">
            <GroupingSettings ShowUnGroupButton="True" />
            <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True"
                ReorderColumnsOnClient="True">
<Selecting AllowRowSelect="True"></Selecting>
 
                <ClientEvents OnRowMouseOver="RowMouseOver"></ClientEvents>
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" ClientDataKeyNames="OrderID, Text" DataKeyNames="OrderID">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn Resizable="False" Visible="False">
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                        </ItemTemplate>
                        <FooterStyle Width="32px" />
                        <HeaderStyle Width="32px" />
                        <ItemStyle Width="32px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="OrderId" GroupByExpression="OrderID" HeaderText="Order Ref"
                        SortExpression="OrderId" UniqueName="OrderId" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="OrderNum" GroupByExpression="OrderNum" HeaderText="Order Number"
                        SortExpression="OrderNum" UniqueName="OrderNum" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProjectRef" HeaderText="Project" UniqueName="ProjectRef"
                        SortExpression="ProjectRef" GroupByExpression="ProjectRef">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Location" HeaderText="Location" UniqueName="Location"
                        SortExpression="Location" GroupByExpression="Location">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CostCentre" HeaderText="Cost Centre" UniqueName="CostCentre"
                        SortExpression="CostCentre" GroupByExpression="CostCentre">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="AccountCode" HeaderText="Account Code" UniqueName="AccountCode"
                        SortExpression="AccountCode" GroupByExpression="AccountCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="activityRef" HeaderText="Order Activity" UniqueName="activityRef"
                        SortExpression="activityRef" GroupByExpression="activityRef">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CategoryRef" HeaderText="Type of Work" UniqueName="CategoryRef"
                        SortExpression="CategoryRef" GroupByExpression="CategoryRef">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Order Date" HeaderText="Order Date" UniqueName="OrderDate"
                        SortExpression="Order Date" GroupByExpression="Order Date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Plan Date" HeaderText="Target Complete" UniqueName="TargetComplete"
                        SortExpression="Plan Date" GroupByExpression="Plan Date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Actual Date" HeaderText="Actual Complete" UniqueName="ActualComplete"
                        SortExpression="Actual Date" GroupByExpression="Actual Date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Amount" HeaderText="Estimated Cost" UniqueName="EstimatedCost"
                        SortExpression="Amount" GroupByExpression="Amount">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ServiceProvider" HeaderText="Service Provider"
                        UniqueName="ServiceProvider" SortExpression="ServiceProvider" GroupByExpression="ServiceProvider"
                        Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Text" HeaderText="Text" UniqueName="Text" Display="false">
                    </telerik:GridBoundColumn>
                </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
                <CommandItemTemplate>
                    <table style="width: 100%;">
                        <tr>
                            <td style="width: 50%;">
                                <a href="#" onclick="return ShowInsertForm();">
                                    <img alt="Insert" border="0" height="20" src="App_Images/AddRecord.gif" width="20" />
                                    Add New Record</a>
                            </td>
                            <td align="right" style="width: 50%">
                                <asp:CheckBox ID="chkArchived" runat="server" AutoPostBack="True" OnCheckedChanged="chkShowArchived_CheckChanged"
                                    Text="Show Archived" Width="163px" />
                            </td>
                            <td align="right" style="width: 50%">
                                <asp:CheckBox ID="chkComplete" runat="server" AutoPostBack="True" OnCheckedChanged="chkShowComplete_CheckChanged"
                                    Text="Show Completed" Width="163px" />
                            </td>
                        </tr>
                    </table>
                </CommandItemTemplate>
            </MasterTableView>
            <GroupPanel Visible="True">
            </GroupPanel>
                        <ClientSettings AllowDragToGroup="True" Selecting-AllowRowSelect="true">
            </ClientSettings>
            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
        <asp:Label ID="lblShowArchived" runat="server" Text="False" Visible="False"></asp:Label>
        <asp:Label ID="lblShowComplete" runat="server" Text="False" Visible="False"></asp:Label>
        <asp:Label ID="lblOrderType" runat="server" Visible="False"></asp:Label>
        <asp:HiddenField ID="lblTemplate" runat="server" />
        <asp:Label ID="OutPut" runat="server" Text=""></asp:Label>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Animation="None"
            Behaviors="Default" InitialBehaviors="None" Left="" Top="" ReloadOnShow="True"
            VisibleStatusbar="false">
        </telerik:RadWindowManager>
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblUserCount" />
                    <telerik:AjaxUpdatedControl ControlID="RadSlider1" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
</html>

I can't see any errors myself and it all works fine on the page except this group panel,
Many thanks for your help
Ryan
Ryan
Top achievements
Rank 1
 asked on 07 Nov 2012
1 answer
129 views
hi,

I have downloaded the trial version of Telerik ASP.NET RAD Controls and I want to develop a Grid control with Export capability (pdf, excel and csv). I got a sample application from the Telerix site but it is done in WebForms and I am finding issues after issues while intergrating with an ASP.NET MVC 3.0 app (Razor).

Is there an sample application out some where on how to use the Grid in MVC applicatin with Export capability.

TIA,
Prem
Kostadin
Telerik team
 answered on 07 Nov 2012
3 answers
127 views
Hi,

I have a RadWindowManager containing some Windows. There's one that looks like a confirm dialog that I want to call a Server Side function on click.

RadWindowManager:

<telerik:RadWindowManager ID="rwManager" runat="server" Behaviors="Default" DestroyOnClose="false"
    Modal="true" RestrictionZoneID="containerBCM" VisibleStatusbar="false" IconUrl="Images/Icons/064-Information-circle-Icon16x16.png">
    <Windows>
        <telerik:RadWindow runat="server" ID="winRapport" Modal="true" InitialBehaviors="Maximize"
            EnableShadow="True">
        </telerik:RadWindow>
        <telerik:RadWindow ID="rwSub" runat="server" Behaviors="Close" Width="600px" Height="200px"
            DestroyOnClose="false" Modal="true">
        </telerik:RadWindow>
        <telerik:RadWindow ID="rwIsBilanCompleted" runat="server" Behaviors="Close" Width="310px"
            Height="120px" DestroyOnClose="false" Modal="true" Title="GESPHARxLite 2">
            <ContentTemplate>
                <div class="rwDialogPopup radconfirm">
                    <div class="rwDialogText">
                        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
                            <%=GetMessageEx(5738).TexteHTML%>
                        </telerik:RadCodeBlock>
                    </div>
                    <div>
                        <telerik:RadButton runat="server" ID="btnIBC_Yes" Width="70px" Style="margin: 8px 8px 8px 0px; float: left;"></telerik:RadButton>
                        <telerik:RadButton runat="server" ID="btnIBC_No" Width="70px" Style="margin: 8px 8px 8px 0px; float: left;"></telerik:RadButton>
                    </div>
                </div>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

I have another button (btnPrint) on my page that do a postback and set the "rwIsBilanCompleted.VisibleOnPageLoad" to true so that it shows when it refresh. So I set my RadAjaxManager like this:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <ClientEvents OnResponseEnd="OnResponseEnd"></ClientEvents>
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnPrint">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rwManager" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnIBC_Yes">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="lblEtatBCM" />
                <telerik:AjaxUpdatedControl ControlID="rwIsBilanCompleted" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

It works well. The problem is that when I click on btnIBC_Yes, the entire page refresh like if there was no ajax.

Did I miss something?

Thanks.
Maria Ilieva
Telerik team
 answered on 07 Nov 2012
4 answers
98 views
Hi ,
I can't retrieve the changed content of the radeditor when i have ajax on that page. i have tried the provided solutions but it doesn't work. i need a working solution.







Thanks
Dhamodharan
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
257 views
Dear Experts: 

Issue descriptions:
One of my ASP.NET MVC project uses a number of Telerik Controls and works fine, the report uses Telerik ReportViewer which is also no problem. both on my development Computer and product Server. Recently, I deployment it on my new Server, whenever go to Report Module always receive a Windows Security to ask to input Windows user and password. it doesn't work both I input Server Administration or Click cancel. 

Other Modules which not use Reportviewer are no problem, and there is not any code lead to ask Window Security in report module.
I use same way and binding same IP on IIS for previous Server(works fine) and Current Server(doesn't Work).

So, is there any chance will let the Telerik.Reportviewer to ask Windows Security certification?

This project is From authentication.

I found out by Fiddler when I go to report module will send a 401 request to server in current Server.
But do same operation on old server, the request is a 200 request.

When pop up a Windows Security Dialog while go to report Module:
Click Cancel: this is nothing to do, but redirect a empty View.

Click OK with correct user and password will receive error as below:

Server Error in '/Reports' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Reports/Report/Index/HeadOffice


Version Information: Microsoft .NET Framework Version:2.0.50727.5456; ASP.NET Version:2.0.50727.5456 

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

The following content is got from developer Tools of IE 9.0

 The request header is as below:
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
3 401 HTTP 184.107.200.202 /Reports/Report/Index/HeadOffice 0

Of course, you can open the attach files: one is Windows Security Dialog, other one is Fiddler collection Http requests.

Here is the error log from the server:

 

Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 9/13/2012 12:54:37 PM
Event ID: 1315
Task Category: Web Event
Level: Information
Keywords: Classic
User: N/A
Computer: IW-00163E003d8c
Description:
Event code: 4005
Event message: Forms authentication failed for the request. Reason: The ticket supplied was invalid.
Event time: 9/13/2012 12:54:37 PM
Event time (UTC): 9/13/2012 4:54:37 PM
Event ID: ba5dc85e13f645d2810d29eb4a7477a4
Event sequence: 2
Event occurrence: 1
Event detail code: 50201

Application information:
Application domain: /LM/W3SVC/4/ROOT-1-129920288750619610
Trust level: Full
Application Virtual Path: /
Application Path: C:\Applications\VeriLoyal\
Machine name: IW-00163E003D8C

Process information:
Process ID: 3000
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM

Request information:
Request URL:
http://184.107.200.204/Organization/HeadOffice
Request path: /Organization/HeadOffice
User host address: 192.28.0.20
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM

Name to authenticate:

Custom event details:

Event Xml:
<Event xmlns="
http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0" />
<EventID Qualifiers="16384">1315</EventID>
<Level>4</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-09-13T16:54:37.000000000Z" />
<EventRecordID>9061</EventRecordID>
<Channel>Application</Channel>
<Computer>IW-00163E003d8c</Computer>
<Security />
</System>
<EventData>
<Data>4005</Data>
<Data>Forms authentication failed for the request. Reason: The ticket supplied was invalid.</Data>
<Data>9/13/2012 12:54:37 PM</Data>
<Data>9/13/2012 4:54:37 PM</Data>
<Data>ba5dc85e13f645d2810d29eb4a7477a4</Data>
<Data>2</Data>
<Data>1</Data>
<Data>50201</Data>
<Data>/LM/W3SVC/4/ROOT-1-129920288750619610</Data>
<Data>Full</Data>
<Data>/</Data>
<Data>C:\Applications\VeriLoyal\</Data>
<Data>IW-00163E003D8C</Data>
<Data>
</Data>
<Data>3000</Data>
<Data>w3wp.exe</Data>
<Data>NT AUTHORITY\SYSTEM</Data>
<Data>
http://184.107.200.204/Organization/HeadOffice</Data>
<Data>/Organization/HeadOffice</Data>
<Data>192.28.0.20</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>NT AUTHORITY\SYSTEM</Data>
<Data>
</Data>
</EventData>
</Event>


Thanks.
Jason.
IvanY
Telerik team
 answered on 07 Nov 2012
6 answers
420 views
Hello Telerik Team,

I have one issue with radasyncupload control. I need to trap event when user clicks on cancel button during uploading of a file. I didn't find any onclient method which could allow this.

Do you have an idea, how to solve it ?

For further information please check the attachment of this message.

Thank you.

Vasssek
Dimitar Terziev
Telerik team
 answered on 07 Nov 2012
1 answer
86 views
I'm setting the width of my radgrid  and the scrollarea height as a percentage of the window size like so:
function GridCreated(sender, args) {
      var scrollArea = sender.GridDataDiv;
      var gridHeader = sender.GridHeaderDiv;
      scrollArea.style.height = $telerik.$(window).height() / 2 - gridHeader.clientHeight + "px";
      sender.get_element().style.width = ($telerik.$(window).height() * .85) +"px";
     
  }

I've then got  the below clientsettings
<ClientSettings>
      <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="2"/>
      <ClientEvents OnGridCreated="GridCreated" />
   </ClientSettings>

The frozen columns aren't frozen.
Yet if I set the width of the grid  as a property in the <Telerik:RadGrid tag instead of by javascript the frozen columns stay frozen as expected.
Do you have any idea why this might be happening?
Thanks
Pavlina
Telerik team
 answered on 07 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?