Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
HI, i tried to use the radpanelbar to build with my asp.net page. one of my panel item with a custom user control and the custom user control combin with multi control (radtextbox, radButton, raddatapicker and radtextbox). i found the panel bar cannot expand if i use custom user control with controls combin of radtextbox, radButton, raddatapicker and radtextbox and load the control in code behind. the issue is not occur if i don't use custom user control.

custom user control

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProspectSearchCtl.ascx.cs" Inherits="Control_SearchControl_ProspectSearchCtl" %>
  
<telerik:RadComboBox ID="RadComboBox2" runat="server">
</telerik:RadComboBox>
<telerik:RadDateInput ID="RadDateInput2" runat="server">
</telerik:RadDateInput>
<telerik:RadTextBox ID="RadTextBox2" runat="server">
</telerik:RadTextBox>

Main_New.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Main_New.aspx.cs" Inherits="STEPS_Pages_EditForm_Edit_MySearch"  %>
  
<%@ Register src="~/Control/ClientSelectCtl.ascx" tagname="ClientSelectCtl" tagprefix="uc1" %>
  
<%@ Register src="~/Control/ClientRegCtl.ascx" tagname="ClientRegCtl" tagprefix="uc2" %>
  
<%@ Register src="~/Control/TransactionSearchCtl.ascx" tagname="TransactionSearchCtl" tagprefix="uc3" %>
  
<%@ Register src="~/Control/TransactionSearchResultCtl.ascx" tagname="TransactionSearchResultCtl" tagprefix="uc4" %>
  
<%@ Register src="../Control/SearchControl/ProspectSearchCtl.ascx" tagname="ProspectSearchCtl" tagprefix="uc5" %>
  
<!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>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <base target="_self">
    <style type="text/css" >
         html, body, form  
    {  
        height: 100%;  
        margin: 0px;  
        padding: 0px;  
        overflow: hidden;  
    }  
    </style>
    <style type="text/css"
    * + html .buttonsPane
    {
        position: relative;
    }
</style>
  
    <link href="~/css/common2.css" type="text/css" rel="stylesheet"/> 
      
</head>
<body >
<script language="javascript" type="text/javascript">
    function spbLeft_OnClientItemClicked(sender, args) {
        var selectedPanelBar = args.get_item().get_value();
        var mpgMain = $find("<%= mpgMain.ClientID %>");
        if (selectedPanelBar == "Stock") {
            mpgMain.set_selectedIndex(0);
        } else if (selectedPanelBar == "Client") {
            mpgMain.set_selectedIndex(1);
        } else if (selectedPanelBar == "Global") {
            mpgMain.set_selectedIndex(2);
        } else if (selectedPanelBar == "Invoice") {
            mpgMain.set_selectedIndex(3);
        } else if (selectedPanelBar == "Building") {
            mpgMain.set_selectedIndex(4);
        } else if (selectedPanelBar == "Prospect") {
            mpgMain.set_selectedIndex(5);
        } else if (selectedPanelBar == "Transaction") {
            mpgMain.set_selectedIndex(6);
        } else if (selectedPanelBar == "Report") {
            mpgMain.set_selectedIndex(7);
        } else if (selectedPanelBar == "Profile") {
            mpgMain.set_selectedIndex(8);
        }
    }
    </script>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <div style="height:100%; overflow:hidden"
            <telerik:RadSplitter ID="sptMainFrame" runat="server" Orientation="Vertical" SplitBarsSize=""  Width="100%" Height="100%">
                <telerik:RadPane ID="splLeft" runat="server" Width="200px" Visible="true" >
                    <telerik:RadPanelBar 
                        runat="server" ID="spbLeft"
                        Height="100%" ExpandMode="FullExpandedItem" Width="200px" OnClientItemClicked="spbLeft_OnClientItemClicked">
                        <Items>
                            <telerik:RadPanelItem Text="Stock"  Expanded="true" Value="Stock" Visible="false" ImageUrl="~/Images/Home_16x16.png"  >
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Company/Contact"  Expanded="true" Value="Client" Visible="false" ImageUrl="~/images/User_16x16.png" >
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Global"  Expanded="true" Value="Global" Visible="false" ImageUrl="~/Images/global_16x16.PNG">
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Invoice"  Expanded="true" Value="Invoice" Visible="false" ImageUrl="~/Images/Invoice_16x16.PNG">
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Building"  Expanded="true" Value="Building" Visible="false" ImageUrl="~/Images/hospital-icon_16x16.png">
                                <Items>
                                    <telerik:RadPanelItem >
                                       <ItemTemplate>
                                  
                                           <asp:Button ID="Button1" runat="server" Text="Button" />
                                       </ItemTemplate>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="My Prospects"   Value="Prospect" Visible="false" ImageUrl="~/Images/Invoice_16x16.PNG">
                                <Items>
                                    <telerik:RadPanelItem Value="ProspectSearch" >
                                        <Items>
                                            <telerik:RadPanelItem runat="server" Value="ProspectSearchTemplateHolder" >   
                                                  
                                            </telerik:RadPanelItem
                                        </Items>
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Transaction"  Expanded="true" Value="Transaction" Visible="false" ImageUrl="~/Images/Invoice_16x16.PNG">
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="Reports"  Expanded="true" Value="Report" Visible="false" ImageUrl="~/Images/Invoice_16x16.PNG">
                                 
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem Text="My Profile"  Expanded="true" Value="Profile" Visible="false" ImageUrl="~/Images/MyProfile_16x16.PNG">
                                  
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" >
                                <ItemTemplate>
                                    <asp:Image ID="imgSavillsTechnology" Width="180px" runat="server" ImageUrl="~/Images/savillsTechnology_jpg_Resize.jpg" />
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadPane>
                <telerik:RadPane ID="splMain" runat="server" Width="100%" CssClass="buttonsPane" Scrolling="None" Height="100%">
                    <telerik:RadMultiPage ID="mpgMain" runat="server" SelectedIndex="0">
                        <telerik:RadPageView ID="pvwStock" runat="server"  >
                        stock
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwClient" runat="server">
                        client
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwGlobal" runat="server">
                        global
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwInvoice" runat="server">
                        invoice
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwBuilding" runat="server">
                        building
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwProspect" runat="server">
                        prospect
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwTransaction" runat="server">
                        transaction
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwReport" runat="server">
                        report
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="pvwMyProfile" runat="server">
                        profile
                        </telerik:RadPageView>
                    </telerik:RadMultiPage>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </div>
        <telerik:RadAjaxManager runat="server">
        </telerik:RadAjaxManager>
          
    </form>
</body>
</html>


Main_New.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using Savills.Web;
using Savills.DataSource;
using Telerik.Web.UI;
  
public partial class STEPS_Pages_EditForm_Edit_MySearch : CommonPage
{
  
    //private long? _recordId = null;
    private long? _mySearchId = null;
    private long _clientId;
    private long? _assoClientId;
    private string _action = null;
    private bool _isCreateNewMySearch = false;
    private bool _isShowClientInfo = true;
    private string _menu = null;
    private string _multiLocationList = null;
    private string _leaseStatus = null;
    private string _tenureType = null;
    private bool _showSearchPane = true;
    private string _fromCond = null;
  
    #region properties
    //protected long? RecordId { 
    //    get { return _recordId ; }
    //    set { _recordId = value; }
    //}
    protected long? MySearchId
    {
        get { return _mySearchId; }
        set { _mySearchId = value; }
    }
    protected long ClientId {
        get { return _clientId; }
        set { _clientId = value; }
    }
    protected long? AssoClientId
    {
        get { return _assoClientId; }
        set { _assoClientId = value; }
    }
    protected string Action {
        get { return _action; }
        set { _action = value; }
    }
    public string multiLocationList
    {
        get { return _multiLocationList; }
        set { _multiLocationList = value; }
    }
    public string leaseStatus
    {
        get { return _leaseStatus; }
        set { _leaseStatus = value; }
    }
    public string tenureType
    {
        get { return _tenureType; }
        set { _tenureType = value; }
    }
    public bool showSearchPane
    {
        get { return _showSearchPane; }
        set { _showSearchPane = value; }
    }
    public string fromCond
    {
        get { return _fromCond; }
        set { _fromCond = value; }
    }
  
    protected string IsCreateNewMySearch
    {
        get { return _action; }
        set { _action = value; }
    }
  
    protected bool isShowClientInfo
    {
        get { return _isShowClientInfo; }
        set { _isShowClientInfo = value; }
    }
    #endregion
  
    #region page events
    protected void Page_Init(object sender, EventArgs e)
    {
        //if (Page.IsPostBack)
        //{
            //initForm();
        //}
    }
  
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
        Response.Cache.SetNoStore();
  
        if (Page.IsPostBack)
        {
            //if (ViewState["RecordId"] != null) {
            //    _recordId = long.Parse(ViewState["RecordId"].ToString());
            //}
  
            if (ViewState["MySearchId"] != null)
            {
                _mySearchId = long.Parse(ViewState["MySearchId"].ToString());
            }
  
            if (ViewState["ClientId"] != null)
            {
                _clientId = long.Parse(ViewState["ClientId"].ToString());
            }
            if (ViewState["AssoClientId"] != null)
            {
                _assoClientId = long.Parse(ViewState["AssoClientId"].ToString());
            }
            if (ViewState["Action"] != null)
            {
                _action = ViewState["Action"].ToString();
            }
            if (ViewState["IsCreateNewMySearch"] != null)
            {
                _isCreateNewMySearch = (bool)ViewState["IsCreateNewMySearch"];
            }
            if (ViewState["IsShowClientInfo"] != null)
            {
                _isShowClientInfo = (bool)ViewState["IsShowClientInfo"];
            }
            if (ViewState["Menu"] != null)
            {
                _menu = ViewState["Menu"].ToString();
            }
            if (ViewState["multiLocationList"] != null)
            {
                _multiLocationList = ViewState["multiLocationList"].ToString();
            }
            if (ViewState["leaseStatus"] != null)
            {
                _leaseStatus = ViewState["leaseStatus"].ToString();
            }
            if (ViewState["tenureType"] != null)
            {
                _tenureType = ViewState["tenureType"].ToString();
            }
            if (ViewState["showSearchPane"] != null)
            {
                _showSearchPane = (bool)ViewState["showSearchPane"];
            }
            if (ViewState["fromCond"] != null)
            {
                _fromCond = ViewState["fromCond"].ToString();
            }
            initForm();
        }
        else {
            //if (Request.QueryString["RecordId"] != null) {
            //    _recordId = long.Parse(Request.QueryString["RecordId"].ToString());
            //    ViewState["RecordId"] = _recordId;
            //}
  
            if (Request.QueryString["MySearchId"] != null)
            {
                _mySearchId = long.Parse(Request.QueryString["MySearchId"].ToString());
                ViewState["MySearchId"] = _mySearchId;
            }
  
            if (Request.QueryString["ClientId"] != null)
            {
                _clientId= long.Parse(Request.QueryString["ClientId"].ToString());
                ViewState["ClientId"] = _clientId;
            }
            if (Request.QueryString["AssoClientId"] != null)
            {
                _assoClientId = long.Parse(Request.QueryString["AssoClientId"].ToString());
                ViewState["AssoClientId"] = _assoClientId;
            }
            if (Request.QueryString["Action"] != null)
            {
                _action = Request.QueryString["Action"].ToString();
                ViewState["Action"] = _action;
            }
            if (Request.QueryString["IsCreateNewMySearch"] != null)
            {
                _isCreateNewMySearch = (Request.QueryString["IsCreateNewMySearch"].ToString() == "1");
                ViewState["IsCreateNewMySearch"] = _isCreateNewMySearch;
            }
            if (Request.QueryString["Menu"] != null)
            {
                _menu = Request.QueryString["Menu"].ToString();
                ViewState["Menu"] = _menu;
            }
            if (Request.QueryString["multiLocationList"] != null)
            {
                _multiLocationList = Request.QueryString["multiLocationList"].ToString();
                ViewState["multiLocationList"] = _multiLocationList;
            }
            if (Request.QueryString["leaseStatus"] != null)
            {
                _leaseStatus = Request.QueryString["leaseStatus"].ToString();
                ViewState["leaseStatus"] = _leaseStatus;
            }
            if (Request.QueryString["tenureType"] != null)
            {
                _tenureType = Request.QueryString["tenureType"].ToString();
                ViewState["tenureType"] = _tenureType;
            }
            if (Request.QueryString["showSearchPane"] != null)
            {
                _showSearchPane = (Request.QueryString["showSearchPane"].ToString() == "1");
                ViewState["showSearchPane"] = _showSearchPane;
            }
            if (Request.QueryString["fromCond"] != null)
            {
                _fromCond = Request.QueryString["fromCond"].ToString();
                ViewState["fromCond"] = _fromCond;
            }
            initForm();
            loadData();
        }
    }
    #endregion
  
    #region page functions
  
    private void initForm() {
        checkAccessRight();
        //RadComboBox cbo = new RadComboBox();
        //spbLeft.FindItemByValue("Prospect").Items[0].Controls.Add(cbo);
        Control_SearchControl_ProspectSearchCtl prospectSearchCtl = Page.LoadControl("~/Control/SearchControl/ProspectSearchCtl.ascx") as Control_SearchControl_ProspectSearchCtl;
        prospectSearchCtl.ID = "prospectSearchCtl";
        spbLeft.FindItemByValue("Prospect").Items[0].Controls.Add(prospectSearchCtl);
                //if (_showSearchPane)
                //{
                //    spbLeft.FindItemByValue("Transaction").Visible = true;
                //    Control_TransactionSearchCtl TransactionSearchCtl = Page.LoadControl("~/Control/TransactionSearchCtl.ascx") as Control_TransactionSearchCtl;
                //    TransactionSearchCtl.ID = "TransactionSearchCtl";
                //    TransactionSearchCtl.employeeId = long.Parse(this.employeeId);
                //    TransactionSearchCtl.langDB = base.langDB;
                //    spbLeft.FindItemByValue("Transaction").Controls.Add(TransactionSearchCtl);
                //    spbLeft.FindItemByValue("Transaction").Selected = true;
                //}
                //else
                //{
                //    sptMainFrame.GetPaneById("splLeft").Visible = false;
                //}
                //Control_TransactionSearchResultCtl TransactionSearchResultCtl = Page.LoadControl("~/Control/TransactionSearchResultCtl.ascx") as Control_TransactionSearchResultCtl;
                //TransactionSearchResultCtl.ID = "TransactionSearchResultCtl";
                //TransactionSearchResultCtl.employeeId = long.Parse(this.employeeId);
                //TransactionSearchResultCtl.unitId = -1;
                //TransactionSearchResultCtl.multiLocationList = _multiLocationList;
                //TransactionSearchResultCtl.tenureType = _tenureType;
                //TransactionSearchResultCtl.leaseStatus = _leaseStatus;
                //TransactionSearchResultCtl.langDB = base.langDB;
                //TransactionSearchResultCtl.fromCond = _fromCond;
                //pvwTransaction.Controls.Add(TransactionSearchResultCtl);
                
  
                //sptMainFrame.GetPaneById("splLeft").Visible = false;
                //spbLeft.FindItemByValue("Prospect").Visible = false;
                //spbLeft.FindItemByValue("Prospect").Selected = false;
                  
                //Control_ClientRegCtl ClientRegCtl = Page.LoadControl("~/Control/ClientRegCtl.ascx") as Control_ClientRegCtl;
                //ClientRegCtl.employeeId = long.Parse(this.employeeId);
                //ClientRegCtl.clientId = _clientId;
                //ClientRegCtl.assoClientId = _assoClientId;
                //ClientRegCtl.mySearchId = _mySearchId;
                //ClientRegCtl.langDB = base.langDB;
                //ClientRegCtl.action = _action;
                //ClientRegCtl.isShowClientInfo = _isShowClientInfo;
                //ClientRegCtl.isCreateNewMySearch = _isCreateNewMySearch;
                //ClientRegCtl.systemName = base.systemName;
                //pvwProspect.Controls.Add(ClientRegCtl);
                 
    }
  
    private void loadData()
    {
          
         
    }
  
  
  
  
    private void checkAccessRight()
    {
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Home", this.employeeId))
        {
        }
        else
        {
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Report", this.employeeId))
        {
            spbLeft.FindItemByValue("Report").Visible = true;
            spbLeft.FindItemByValue("Report").Selected = true;
            spbLeft.FindItemByValue("Report").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Report").Visible = false;
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Transaction", this.employeeId))
        {
            spbLeft.FindItemByValue("Transaction").Visible = true;
            spbLeft.FindItemByValue("Transaction").Selected = true;
            spbLeft.FindItemByValue("Transaction").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Transaction").Visible = false;
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Building", this.employeeId))
        {
            spbLeft.FindItemByValue("Building").Visible = true;
            spbLeft.FindItemByValue("Building").Selected = true;
            spbLeft.FindItemByValue("Building").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Building").Visible = false;
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Invoice", this.employeeId))
        {
            spbLeft.FindItemByValue("Invoice").Visible = true;
            spbLeft.FindItemByValue("Invoice").Selected = true;
            spbLeft.FindItemByValue("Invoice").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Invoice").Visible = false;
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Client", this.employeeId))
        {
            spbLeft.FindItemByValue("Client").Visible = true;
            spbLeft.FindItemByValue("Client").Selected = true;
            spbLeft.FindItemByValue("Client").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Client").Visible = false;
        }
  
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Prospect", this.employeeId))
        {
            spbLeft.FindItemByValue("Prospect").Visible = true;
            spbLeft.FindItemByValue("Prospect").Selected = true;
            spbLeft.FindItemByValue("Prospect").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Prospect").Visible = false;
        }
  
        if (CommonFunction.IsSystemParameterExist("BOAccess", "Stock", this.employeeId))
        {
            spbLeft.FindItemByValue("Stock").Visible = true;
            spbLeft.FindItemByValue("Stock").Selected = true;
            spbLeft.FindItemByValue("Stock").Expanded = true;
        }
        else
        {
            spbLeft.FindItemByValue("Stock").Visible = false;
        }
    }
    #endregion
}





Peter
Telerik team
 answered on 19 Jul 2012
5 answers
173 views
Hi,

Not sure if this is the best place, however I have had a problem I can't resolve and need assistence.

I used the upgrade toolbox Telerik tool as part of the upgrade, Now I can only drag controls (including standard VS controls) into the design window.

I hardly ever work here and tend to drop controls straight into the Source window, so this is frustrating.

Any assistence appreciated!

Jason
Petar
Telerik team
 answered on 19 Jul 2012
11 answers
156 views
Hi

A combo box dropdown has a set width. In most cases the text is less to then the full width of the dropdown. However the items in the dropdown only respond to mouse clicks (ie to be selected) when the mouse is clicked on text. If the mouse is clicked somewhere on the dropdown that doesn't contain text the click is not picked up

Any ideas?
Thanks
Dimitar Terziev
Telerik team
 answered on 19 Jul 2012
1 answer
161 views
Hi Telerik,

I have a problem with RadTreeView for a few days now. I am unable to find a reasonable explanation to this.

In the attached file I have sent you the souce code of my problem.

I have read in the following post, that the thing has been solved...
http://www.telerik.com/community/forums/aspnet/treeview/serversidecallback-nodeclick-workaround.aspx

But I still have a problem...the web service created nodes do not trigger server side NodeClick event.

Please be so kind, and look into my code...it is really simple, but it doesn't work:)


Taught I should add the web service too....the treeview has only two levels, and only the second level is populated through web service

The rad controls version is RadControls for ASP.NET AJAX Q1 2011 NET 4.0



Thanks in advance,
regards,
Luka

Bozhidar
Telerik team
 answered on 19 Jul 2012
3 answers
477 views
1.) Drag AJAX Control on WebPart
2.) Get strong name with JustDecompile e.g.:

Telerik.Web.UI, Version=2012.2.607.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4
3.) Replace "Assembly" on UserControl with strong name:

<%@ Register Assembly="Telerik.Web.UI, Version=2012.2.607.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" ...
4.) Open Package.package -> Advanced -> Add -> Add existing assembly... 
4.a) Source Path, e.g: C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q2 2012\Bin35\Telerik.Web.UI.dll
4.b) Deployment Target: GlobalAssemblyCache
4.c) Location: Telerik.Web.UI.dll
4.d) Safe Controls: -> Click here to add new item...
4.e) Namespace: Telerik.Web.UI
4.f) TypeName: *
4.g) Assembly Name (e.g.): Telerik.Web.UI, Version=2012.2.607.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4
4.f) Safe: =Checked

Plamen
Telerik team
 answered on 19 Jul 2012
1 answer
80 views

When i run recorded step for checking check box.actually it check the checkbox but result is not showing.Same step i am doing manually the result is displayed according to check box is selected.
Tell me how to select check box in coded step and why selected check box value is not passing to server.
Ivana
Telerik team
 answered on 19 Jul 2012
1 answer
142 views
Hello,

I was running a trial version of Telerik  since about June 15 or so I would guess.  We purchased the toolset on Friday July 13th and it looked as though there was an updated.  I had started using some of the tools inside our project.   When I bring the project up after the install I am getting errors specifically on the radgrid it looks like.  I haven't tried anything else.  If i remove the grid and attempt to re add it to my project as soon as I slide the control on to my project I get the same thing so it seems my toolbox is broke as well.  I tried doing a reset on the toolbox and that did not do anything.  Also, i verified i have the  telerik.web.ui referenced in my project from the bin40 folder as well.  What happened and how do i fix this?

EDIT:  I forgot to attach the error.  this is what I am getting after we purchased and updated.

Thanks.
Andrey
Telerik team
 answered on 19 Jul 2012
1 answer
734 views
Hello,
I keep having this error with a radgrid (ajaxified with a RadAjaxManager) : Uncaught Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near '%PDF-1.4 

On the Radgrid I ve a button to open / generate a pdf coming from a database. I know the issue is coming from the Response.(), to open the pdf I ve to do something like that: 

Response.Clear()
Response.ContentType = "application/pdf"
Response.AddHeader("Content-Disposition", "attachment; filename=MyPdfFile.pdf")
Response.BinaryWrite(binaryFieldPdf.ToArray)
Response.End()

How could I avoid this error using ajax and still have a Response() in my function?       
Saravana Kumar
Top achievements
Rank 1
 answered on 19 Jul 2012
1 answer
55 views
Hello,

I have added raddatepicker Q4 2006 control on a asp.net web page and set focus on it like raddatepicker1.Focus() in page load event handler. The moment this page is loaded and shown on browser, this control loses focus.

Please tell me how to retain focus on this control when page is loaded.
Vasil
Telerik team
 answered on 19 Jul 2012
1 answer
109 views
I know that this question has been asked many times but I'm having problems getting paging working with my grid. I've looked at the examples and still can't get it right. Could someone please point me in the right direction with my code?

<telerik:RadGrid ID="ProfileGrid" Width="100%" AllowFilteringByColumn="True"
            AllowSorting="True" PageSize="12" ShowFooter="True" AllowPaging="True" ViewStateMode="Enabled"
            runat="server" OnNeedDataSource="ProfileGrid_NeedDataSource" AutoGenerateColumns="false"
            GridLines="None" ShowStatusBar="true" AllowMultiRowSelection="True" DataKeyNames="ProfileID">
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="ProfileID" DataField="ProfileID" ReadOnly="True"
                        UniqueName="ProfileID" Display="False" />
                    <telerik:GridClientSelectColumn UniqueName="CheckboxSelectColumn" />
                    <telerik:GridBoundColumn DataField="Email" HeaderText="Email" />
                    <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" />
                    <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" />
                    <telerik:GridBoundColumn DataField="Occupation" HeaderText="Occupation" />
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="Company" />
                    <telerik:GridBoundColumn DataField="Source" HeaderText="Source" />
                    <telerik:GridBoundColumn DataField="ProfileLastModifiedDate" HeaderText="Modified" />
                    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" />
                    <telerik:GridButtonColumn Text="View Full Profile" CommandName="View Full Profile" />
                </Columns>
            </MasterTableView>
            <ClientSettings EnableRowHoverStyle="true">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
        </telerik:RadGrid>

public partial class ProfilesGridControl : ProfileControlBase
{
 
    protected override void FillProfiles()
    {
        List<IProfile> profilesList = new List<IProfile>();
        ProfileDal profileDal = new ProfileDal();
        profilesList = profileDal.SelectAll();
        ViewState["Profiles"] = profilesList;
        ProfileGrid.DataSource = ViewState["Profiles"];
    }
 
    protected void ProfileGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        if (ViewState["Profiles"] != null)
        {
            ProfileGrid.DataSource = ViewState["Profiles"];
        }
        {
            FillProfiles();
        }
    }
 
}

The grid loads the data successfully when the page is first loaded but if I try to page I first get a grid with all of the rows I would expect but no data. Then if I page again I get no grid just a blank page. What am I doing wrong? Note profileDal.SelectAll() creates a list of IProfile business objects by querying a SQL server database using a stored procedure. Calling profileDal.SelectAll() fetches all the data required first time. The data is not being fetched page by page.
Andrey
Telerik team
 answered on 19 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?