Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
43 views
I've noticed an issue with the Telerik Online Documentation when viewed in IE 7 or 8. Everytime I select one of the topics, the page auto-scrolls back to the top of the page. So if I select RadControls -> RadGrid. Once the items under RadGrid are fully expanded, it auto-jumps back to the top of the page, which is starting to become a little frustrating to use the Online Documentation. When viewed in Chrome, this issue does not occur.

I've attached a screen capture, which shows my problem.

http://screencast.com/t/DozyhJSuUnD


Is there something the Telerik team can do to make the Online Documentation not jump around when viewed in IE?
Filip
Telerik team
 answered on 31 Jan 2012
6 answers
220 views
Hi,
  I have a radgrid with static headers and scrolling(no paging). When I set AllowKeyboardNavigation=true, 'Page Up','Page Down','Home' and 'End' keys stopped working. But when it set to false, these keys work properly. I have set EnableKeyboardShortcuts=false. I wish to have these keys working.

Thanks,
Mahesh
Radoslav
Telerik team
 answered on 31 Jan 2012
1 answer
150 views
Hi

In my page i have 2 textboxes for code,  name and i have one button. While click the button radwindow will open.
Inside the radwindow i have called the normal aspx page. While clicking the radbutton i was passing the textbox id's to the popup page. In the radgrid i have link button. When i click the link button the code and name should be assigned to the querystring and radwindow should close. Then the selected value should assign to the textboxes. Please find the attached project for the same. in that attachement i have given normal window and the radwindow.

RadWindowCallingPage.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="RadWindowCallingPage.aspx.cs" Inherits="RadWindowCallingPage" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script type="text/javascript">        function FunctionWithDescriptionssss(controlID, DescrcontrolID, popupName) {
            var text = document.getElementById(controlID).value;
            var textdesc = document.getElementById(DescrcontrolID).value;
            document.getElementById(controlID).readOnly = true;
            var url = popupName + ".aspx?controlID=" + controlID + "&controlText=" + text + "&DescrcontrolID=" + DescrcontrolID + "&txtDescr=" + textdesc + "";
            var pop = window.radopen(url, "Lookup", "top=20,left=100,width=650,Height=500,scrollbars=yes,resizable=no,status=yes", "");
        }
        function FunctionWithDescription(controlID, DescrcontrolID, popupName) {
            var text = document.getElementById(controlID).value;
            var textdesc = document.getElementById(DescrcontrolID).value;
            document.getElementById(controlID).readOnly = true;
            var url = popupName + ".aspx?controlID=" + controlID + "&controlText=" + text + "&DescrcontrolID=" + DescrcontrolID + "&txtDescr=" + textdesc + "";
            var pop = window.open(url, "Lookup1", "top=20,left=100,width=650,Height=500,scrollbars=yes,resizable=no,status=yes", "");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadWindowManager runat="server" RestrictionZoneID="offsetElement" ID="RadWindowManager1"
        EnableShadow="true" ShowOnTopWhenMaximized="false">
        <Windows>
            <telerik:RadWindow ID="test1" NavigateUrl="lookup.aspx" VisibleOnPageLoad="false"
                Top="20" Left="100" runat="server">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <table width="60%">
        <tr>
            <td>
                S.No
            </td>
            <td>
                <telerik:RadTextBox ID="txtcode" runat="server">
                </telerik:RadTextBox>
            </td>
            <td>
                Name
            </td>
            <td>
                <telerik:RadTextBox ID="txtdesc" runat="server">
                </telerik:RadTextBox>
            </td>
        </tr>
        <tr>
            <td>
                Radwindow
            </td>
            <td>
                <asp:Image ID="imgradwindow" runat="server" Height="17px" ImageUrl="~/images/PopupButtonImage.bmp"
                    Width="18px" ImageAlign="Right" TabIndex="2" />
            </td>
        </tr>
        <tr>
            <td>
                Normal Window Control
            </td>
            <td>
                <asp:Image ID="imgnormalwindow" runat="server" Height="17px" ImageUrl="~/images/PopupButtonImage.bmp"
                    Width="18px" ImageAlign="Right" TabIndex="2" />
            </td>
        </tr>
    </table>
</asp:Content>
RadWindowCallingPage.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class RadWindowCallingPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        imgradwindow.Attributes.Add("onclick", "JavaScript:FunctionWithDescriptionssss('" + txtcode.ClientID + "','" + txtdesc.ClientID + "','lookup');");
        imgnormalwindow.Attributes.Add("onclick", "JavaScript:FunctionWithDescription('" + txtcode.ClientID + "','" + txtdesc.ClientID + "','lookup');");
       
    }
}

lookup.aspx

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

<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
 
    <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false"
            onneeddatasource="RadGrid1_NeedDataSource">
            <MasterTableView AllowMultiColumnSorting="false" GridLines="Both" AllowSorting="true"
                TableLayout="Fixed" AllowAutomaticUpdates="true">
                <Columns>
                    <telerik:GridTemplateColumn HeaderText="Code" UniqueName="Code" DataField="CODE"
                        ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="35%" />
                        <ItemStyle Width="35%" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkAccountCode" runat="server" OnClick="LinkButton1_Click"  Text='<%# DataBinder.Eval (Container.DataItem, "CODE") %>'
                                ValidationGroup='<%# DataBinder.Eval (Container.DataItem, "NAME") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name" DataField="NAME"
                        ItemStyle-HorizontalAlign="Left">
                        <HeaderStyle Width="60%" />
                        <ItemStyle Width="60%" />
                        <ItemTemplate>
                            <asp:LinkButton ID="lnkAccountDesc" runat="server" OnClick="LinkButton2_Click" Text='<%# DataBinder.Eval (Container.DataItem, "NAME") %>'
                                ValidationGroup='<%# DataBinder.Eval (Container.DataItem, "CODE") %>'></asp:LinkButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

lookup.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class lookup : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
          
        }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        string Code = ((LinkButton)sender).Text.Trim();
        string Description = ((LinkButton)sender).ValidationGroup;

        string controlID = Request.QueryString["controlID"]+"_text";
        string txtID = Request.QueryString["controlID"];
        string DescrcontrolID = Request.QueryString["DescrcontrolID"] + "_text";

        if (Request.QueryString["txtDescr"] == null)
        {
            string strSupplierText = ((LinkButton)sender).ValidationGroup;
            string myScript = @"window.opener.document.getElementById('" + controlID + "').value = '" + Code.Trim() + "';window.close();";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Myscript", myScript, true);
        }
        else
        {            
            string controlText = Request.QueryString["controlText"];
            string myscript1 = @"window.opener.document.getElementById('" + controlID + "').value = '" + Code.Trim() + "';window.opener.document.getElementById('" + DescrcontrolID + "').value = '" + Description.Trim() + "';window.close();";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Myscript", myscript1, true);
        }            
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        string Code = ((LinkButton)sender).ValidationGroup;
        string Description = ((LinkButton)sender).Text.Trim();
        string controlID = Request.QueryString["controlID"] + "_text";
        string txtID = Request.QueryString["controlID"];
        string DescrcontrolID = Request.QueryString["DescrcontrolID"] + "_text";

        if (Request.QueryString["txtDescr"] == null)
        {
            string strSupplierText = ((LinkButton)sender).ValidationGroup;
            string myScript = @"window.opener.document.getElementById('" + controlID + "').value = '" + Code.Trim() + "';window.close();";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Myscript", myScript, true);
        }
        else
        {            
            string controlText = Request.QueryString["controlText"];
            string myscript1 = @"window.opener.document.getElementById('" + controlID + "').value = '" + Code.Trim() + "';window.opener.document.getElementById('" + DescrcontrolID + "').value = '" + Description.Trim() + "';window.close();";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Myscript", myscript1, true);
        }
    }

   
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetTable();
    }

    static DataTable GetTable()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add("CODE", typeof(int));
        dt.Columns.Add("NAME", typeof(string));

        dt.Rows.Add(1, "Nithya");
        dt.Rows.Add(2, "Divya");
        dt.Rows.Add(3, "Saranaya");
        dt.Rows.Add(4, "Revathi");
        dt.Rows.Add(5, "Abilasha");
        return dt;
    }
}

Princy
Top achievements
Rank 2
 answered on 31 Jan 2012
4 answers
160 views
How to perform Custom Pagination  for a RadGrid ?
Thanks in Advance.
Naveen kumar
Top achievements
Rank 1
 answered on 31 Jan 2012
1 answer
88 views
Referring to your forum post of the same title it is stated:

Q3 2011 (Version number: 2011.3.1115)

Probem
: When adding items to OData enabled controls (RadMenu, RadTreeView, RadListBox, RadComboBox) through design time erroneous markup is applied to the control:
Solution: Remove the ODataSetting section and the issue will vanish. The problem is also fixed in the Q3 SP1 release, version number 2011.3.1305

Well sorry, but that is not true. I have 2011.3.1305.40 installed and still experienced the problem with RadMenu. Only when I deleted the OData markup did this error disappear.
Incidentally, I was pulling my hair out for some time over this error as I could only think there was a reference somewhere in the project to an older version dll as well as 2011.3.1305.40. This error should never have appeared in any release, so how come it got through all the QA process?

Jonathan
Genady Sergeev
Telerik team
 answered on 31 Jan 2012
0 answers
110 views
Hi,
I recently upgraded application from MOSS 2007 to SharePoint 2010  using .net framework 3.5 and telerik 2011.2.915.35 version. As a result, now the module throws the following run time errors upon execution.

When the page is loaded for the first time with the table row hidden via java script function and after a partial (UpdatePanel) postback is initiated the RAD Grid control inside table row is shown with data but the Java Script error occurs (shown below)

Message: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type
Line: 2705
Char: 12
Code: 0
URI: http://Server:1234/ScriptResource.axd?d=FEmGdL_zqjCerpI-0jAKwWndRQkkKFCtSZ2SnyE46Qd7JxCDXnuTED5ZxqgOfdK7q8LOFMqK0CTtwbhhsJJfRj0zClLogNdsRwl7AAIoqBeM7_ZazKIWJ1mvV7_4Al0ivEzaUkOHwHBoWLpFgOszAkLD-VRtdpHaFsp6J00EAWcHzkAn0&t=fffffffff9d85fa6


when i execute it directly in the browser from a Mozilla firfox it works.

Any help is very much welcome :)

Regards
Akhil Sachdeva

Akhil
Top achievements
Rank 1
 asked on 31 Jan 2012
1 answer
129 views
I am quite new to ASP.NET Ajax, so bear with me if this is a simple question or if I have missed a demo that matches these requirements.

I am looking at porting the notion of 'variable drill down' from an existing Winform financial application.

Imagine a grid displaying summary company financials.  One of the lines is inventory.  The user can directly enter a dollar value for inventory, or by double clicking gets a new dialog that allows detailed entry of inventory information (Description, Qty, Value,etc).
Another line might debt.   Again, the user can enter a single value for total debt, or by double clicking bring up a data a dialog that allows the entry of loan information (Description, interest rate, amount of loan, payment frequency, etc).

Having looked at the various Grid demos -- there are interesting capabilities there, but it was not clear if the variable drill-down functionality can be done natively.  If not, what would be best approaches to achieve a comparable functionality.

Thanks up front for suggestions.

Bob
Andrey
Telerik team
 answered on 31 Jan 2012
4 answers
188 views
Hello,

 I am using Ajax model pop up ,rad window and rad editor on the same page.Now,my telerik edior and telerik rad window are not working.
Previously,I dont have rad window on my page where I am using rad Editor.That time It worked fine.Now,as per our requirements,I newly added rad window to it and I am using that as a model pop up on my page.Now,the problem is on my head,becuase of this,rad ediotor behaving viard ,it has been disabled,I am unable to click any of the buttons on the rad edior and I am unable to type into it.In other pages it is working fine.

I googled it.I am helpless,I dont find any solutions to my problem.

I am grateful to you people.If you respond back ASAP.


Thank you.

Vishnu Vardhan Reddy
Top achievements
Rank 2
 answered on 31 Jan 2012
0 answers
91 views
Hi,

I recently upgraded application from MOSS 2007 to SharePoint 2010  using .net framework 3.5 and telerik 2011.2.915.35 version. As a result, now the module throws the following run time errors upon execution.

When the page is loaded for the first time with the table row hidden via java script function and after a partial (UpdatePanel) postback is initiated the RAD Grid control inside table row is shown with data but the Java Script error occurs (shown below)


when i execute it directly in the browser from a Mozilla firfox it works.

Kindly let us know how can we resolve this issue.

Regards,
Rohan Kondvilkar
rohan
Top achievements
Rank 1
 asked on 31 Jan 2012
3 answers
70 views
Hi,

I tried to implement the demo located here:
http://www.telerik.com/help/aspnet/grid/grdsavingsettingsonperuserbasis.html 

The demo was written for the old set of controls; I tried to use the code against the latest version of RadGrid and get the following error:

Unable to cast object of type 'System.Collections.ArrayList' to type 'System.Object[]'.


getting thrown here, when trying to read the settings:

Dim gridSettings() As Object = CType(formatter.Deserialize(reader), Object())


I literally just copy/pasted the demo code into my app and changed the "Telerik.WebControls" reference to "Telerik.Web.UI" instead...

Note, I'm saving and reading the settings to a cookie.
Also tried saving to session (StateServer enabled) and get the same error.

Quick fix?
Andrey
Telerik team
 answered on 31 Jan 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?