Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
196 views
i keep getting this error

Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object

when I click on the second or third tab

when I try to implement the load on demand radtabstrip demo

i am using 2010.1 519 version of the controls

the demo seems to say this should work - is this a bug?

aspx page
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <script type="text/javascript"
        function onTabSelecting(sender, args) { 
            var foo = args.get_tab(); 
            if (args.get_tab().get_pageViewID()) { 
                args.get_tab().set_postBack(false); 
            } 
        } 
    </script> 
                    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" 
                        MultiPageID="RadMultiPage1" Orientation="HorizontalTop" 
                        OnTabClick="RadTabStrip1_TabClick" OnClientTabSelecting="onTabSelecting"
                    </telerik:RadTabStrip> 
                    <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" 
                        Height="250px" Width="475px" BorderWidth="1" OnPageViewCreated="RadMultiPage1_PageViewCreated"
                    </telerik:RadMultiPage> 


code behind
 protected void Page_Load(object sender, EventArgs e) 
    { 
        if (!Page.IsPostBack) 
        { 
            AddTab(RadTabStrip1, "Tab1"); 
            AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab1")); 
            AddTab(RadTabStrip1, "Tab2"); 
            //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab2")); 
            AddTab(RadTabStrip1, "Tab3"); 
            //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab3")); 
        } 
    } 
 
    private void AddTab(RadTabStrip tabstrip, string tabName) 
    { 
        RadTab tab = new RadTab(); 
        tab.Text = tabName
        tabstrip.Tabs.Add(tab); 
    } 
 
    private void AddPageView(RadMultiPage multipage, RadTab tab) 
    { 
        RadPageView pageView = new RadPageView(); 
        pageView.ID = tab.Text; 
        multipage.PageViews.Add(pageView); 
        tab.PageViewID = pageView.ID; 
    } 
 
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) 
    { 
        AddPageView(RadMultiPage1, e.Tab); 
        e.Tab.PageView.Selected = true
    } 
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) 
    { 
        string userControlPath = "~/WebUserControl.ascx"
 
        Control userControl = Page.LoadControl(userControlPath); 
        if (e.PageView.ID == "Tab1") 
        { 
            userControl.ID = "UserControl1"
        } 
        else if (e.PageView.ID == "Tab2") 
        { 
            userControl.ID = "UserControl2"
        } 
        else if (e.PageView.ID == "Tab3") 
        { 
            userControl.ID = "UserControl3"
        } 
 
        e.PageView.Controls.Add(userControl); 
    } 
Yana
Telerik team
 answered on 25 Jun 2010
1 answer
262 views
Hi,
I have a page with RadGrid with AllowPaging="true", AllowSorting="true", AutoGenerateColumns="false".
The data in the grid populated correctly without any problem.
When user click on the header of 1 of the column, the data in the grid is sorted according to the column (ascending/descending) without problem.
But after user click on the header of the column, an arrow will appear beside the header of the column, when click on the arrow, will hit error:
Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Attached is the screenshot of the error:
error01.jpeg - Before click on header of column
error02.jpeg - After click on colum header "Schedule Name" then the data is sorted according to the column and an arrow appear beside "Schedule Name"
error03.jpg - After click on the arrow beside "Schedule Name", hit error

What should i do?
Thanks!
Pavlina
Telerik team
 answered on 25 Jun 2010
5 answers
164 views
I essentially copied the code from the Scheduler demo.  The only major differences are that I am utilizing an asp:ObjectDataSource to get data for the Timeline, and I did not set any of the DataRecurrence values.  I'm not certain of what the DataRecurrence values even do, but the ObjectDataSource appears to be working correctly to pull the data (at least, it pulls the GroupBy labels correctly).

I have just one entry from a database being pulled for the actual timeline, for testing purposes.  I cannot see the entry within the timeline.  However, advancing the timeline forward shrinks the row height, making it appear that the data is pulled but is just not shown properly.  I have attached a screenshot of this behavior.

Here is a sample of the Timeline control's code within my aspx file (I am not yet utilizing this control in the back-end):

<telerik:RadScheduler runat="server" ShowViewTabs="false" OverflowBehavior="Expand" ColumnWidth="250px" TimelineView-NumberOfSlots="30" ID="timeline" GroupBy="Type" GroupingDirection="Vertical" DataSourceID="timelineDataSource" SelectedView="TimelineView" DataKeyField="RegulatoryResultsId" DataStartField="CreatedOn" DataEndField="ReceiveOn" DataSubjectField="Description"
        <ResourceTypes> 
            <telerik:ResourceType  KeyField="TypeId" Name="Type" TextField="TypeName" ForeignKeyField="TypeValue" 
                        DataSourceID="timelineSectionSource" /> 
        </ResourceTypes> 
</telerik:RadScheduler> 

Vuyiswa
Top achievements
Rank 2
 answered on 25 Jun 2010
1 answer
93 views
I am writing a program that opens up a RadWindow for the user to select a user, the window returns the appropriate info from the customer selected. In the ClientClose function I have been trying to make 'pnlCustomerInfoCustomerData' visible=True. I have attached my code below that I am trying to use, any help would be great.

<telerik:radscriptmanager runat="server" ID="ScriptManager" EnablePageMethods="True"></telerik:radscriptmanager>  
 
    <telerik:radscriptblock runat="server" ID="radScriptBlock">  
        <script type="text/javascript">  
            function openCustomerLookupWindow()  
            {                    
                var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>");    
                var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>");    
                var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>");    
                var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>");    
                var oWnd = window.radopen('../../Lookups/NavCustomerLookup.aspx?navco=<%=session("SP_SearchCustomerNavCompany")%>&no=' + txtNo.get_value() + '&conam=' + txtCoNam.get_value() + '&cpn=' + txtCPN.get_value() + '&city=' + txtCity.get_value() + '&state=' + cboState.get_value() + '',"winCustomerLookup");  
                //oWnd.argument = combo.get_value();   
                oWnd.Center();  
                //oWnd.SetSize(800,500);  
            }  
              
            function clientShow(sender, eventArgs)  
            {  
                //var txtDate = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                //sender.argument = txtDate.get_value;    
                //sender.argument = document.getElementById('<%=txtExistingCustomerSearchCustomerNo.ClientID%>').innerText;   
            }  
 
            function clientClose(oWnd,args)  
            {  
                var txtNo = $find("<%= txtExistingCustomerSearchCustomerNo.ClientID %>");    
                var txtCoNam = $find("<%= txtExistingCustomerSearchCompanyName.ClientID %>");    
                var txtCPN = $find("<%= txtExistingCustomerSearchContactPerson.ClientID %>");    
                var txtCity = $find("<%= txtExistingCustomerSearchCity.ClientID %>");    
                var cboState = $find("<%= cboExistingCustomerSearchState.ClientID %>");    
                //get the transferred arguments  
                var arg = args.get_argument();  
                if(arg)  
                {   
                    var CustomerNo = arg.CustomerNo;  
                    var CompanyName = arg.CompanyName;  
                    var ContactPersonName = arg.ContactPersonName;  
                    var CustomerCity = arg.CustomerCity;  
                    var CustomerState = arg.CustomerState;  
                      
                    txtNo.set_value(CustomerNo);  
                    txtCoNam.set_value(CompanyName);  
                    txtCPN.set_value(ContactPersonName);  
                    txtCity.set_value(CustomerCity);  
                    cboState.set_value(CustomerState);  
                    document.getElementById('pnlCustomerInfoCustomerData').style.display = 'none';            
                }  
                document.forms[0].submit();  
            }  
              
              
        </script>  
    </telerik:radscriptblock> 


The Panel I use:
<telerik:radajaxpanel runat="server" LoadingPanelID="LoadingPanel" ID="AjaxPanel" Wrap="False" EnableAJAX="False">  
<asp:Panel ID="pnlCustomerInfoCustomerData" runat="server"></asp:Panel>  
</telerik:RadAjaxPanel> 
Georgi Tunev
Telerik team
 answered on 25 Jun 2010
1 answer
201 views
This was originally posted as a General Feedback support ticket, but I was told that it would be better to post it here.
The original post is below the ************************************************************************************************

Thank you for your reply.
I originally tried to use the regular ASP Update Panel but that required an AjaxScriptManager.  Since my page also has Rad controls on them I needed to use a RadScriptManager, and I was unable to use both.  Therefore to us the RadAjaxManager I used the RadScriptManager.
I have looked at the url you listed below and tried using the RadAjaxManagerProxy without any better results.  I will look at this in more depth to see if there is anything I am missing.

Please let me know what other suggestions you may have.
Thanks
logostech
************************************************************************************************

From: 
Date: 6/23/2010 4:08:49 AM

Hello Don,

Thank you for contacting us.

Could you please try to use regular asp UpdatePanel instead of RadAjaxManager in your User Control and verify if the issue still persists.  Also please confirm that you are placing ScriptManager control in the very top of the main page for properly ajax functioning. You could refer to the following help topic which elaborate on RadAjax and UserControls:
http://www.telerik.com/help/aspnet-ajax/ajxusercontrols.html

Also please note that the purpose of the General Feedback type of tickets is for the customers to share their opinion of our products, support, help and etc. and provide suggestions for further improvements.
The support tickets and forums are used for submitting issues you faced with our controls.
Therefore, for further tracking the problem please start a formal support ticket or a forum thread and we will address your questions as necessary.


Best wishes,
Maria Ilieva
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items




From: logostech
Date: 6/21/2010 5:58:42 PM

I have a UserControl that is basically just an ASP button.  The control works fine and I can use the OnClick event to access asp methods.  The problem seems to be when I try to get it to work with a RadAjax Manager.

This is how I have it set up in the Manager:

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

    <AjaxSettings>

 

 

        <telerik:AjaxSetting AjaxControlID="btnGenerate">

 

 

            <UpdatedControls>

 

 

                <telerik:AjaxUpdatedControl ControlID="txt_Text_Message"></telerik:AjaxUpdatedControl>

 

 

            </UpdatedControls>

 

 

        </telerik:AjaxSetting>

 

 

 

    </AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

This is how the control is placed on the page:

 

<

 

btn:Button ID="btnGenerate" runat="server" OnClick="parseHTML_btn_Click" Text="Auto-Generate"

 

 

    FontBold="true" Font="Arial" FontSize="11px" ToolTip="Auto Generate Text Message from HTML Message"

 

 

    OnClientClick="return confirm('This will replace your current text.');" />

 

 

 

 

 

Here is the non-UserControl button I was using:
<
asp:ImageButton ID="btnGenerateOld" runat="server" ImageUrl="Images/auto_generate_wide.gif" onclick="parseHTML_btn_Click" OnClientClick="return confirm('This will replace your current text.');" />


The btnGenerate works fine when it is not in the RadAjaxManager, but of course it does a full page postback.  When it is in the manager it does not do anything.
The btnGenerateOld that I was using works in either the RadAjaxManager or as a full postback.

I have worked with this all day and have just gotten frustrated.  Please help me out.
Thanks,
Don Buck




Maria Ilieva
Telerik team
 answered on 25 Jun 2010
1 answer
889 views
Hello Sir

How can i Set Combobox Selected Value Through Client Side.

Like In Combo Box There is 5 Item and all has Same text And Value and i want to set combobox Item which Value is 12;

Please Help Me.

Thanks
Chandan.
Shinu
Top achievements
Rank 2
 answered on 25 Jun 2010
1 answer
117 views
I have four RadPanelItem in a RadPanelBar. I want to set their heights in percent that they can be resized according to the height of the Browser. I have tried with ChildGroupHeight but this does not work. My code looks like this.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestUI1.aspx.cs" Inherits="TestUI1" %> 
<%@ 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>Untitled Page</title> 
    <style type="text/css">  
    html, body, form        
        {  
            margin: 0;  
            padding: 0;  
            height: 100%; /* this is the key! */  
            font-size: 11px;  
        }  
        #main_container  
        {  
            position: absolute;  
            left: 0;  
            top: 0;  
            padding: 0;  
            width: 100%;  
            height: 100%; /* works only if parent container is assigned a height value */  
            color: #333;  
            background-color: #83b0ec;  
            background-image: url("images/navshape.jpg");  
            background-repeat: repeat-x;  
              
        }  
        #sub_container  
        {  
            padding: 0px 10px 0px 10px;  
        }  
        #site_header  
        {  
            padding-left: 30px;  
            padding-top: 30px;  
            height: 80px;  
        }  
        .RadPanelBar_Windows7 .rpLink .rpText  
        {  
            font-weight:bold;  
            font-size:13px;  
            color:#003366;  
        }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" /> 
        <div id="main_container">  
            <div id="sub_container">  
                <div id="site_header">  
                    <asp:Image ID="Image1" runat="server" BorderWidth="0" ImageUrl="~/images/ClaimShare.gif" 
                        AlternateText="Claim Share" /> 
                </div> 
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
                        <telerik:RadPanelBar runat="server" ID="RadPanelBar1" Skin="Windows7" Width="100%" ExpandMode="multipleexpandeditems" Height="100%">  
                            <Items> 
                                <telerik:RadPanelItem Text="Cases" Expanded="true" ImageUrl="~/images/icons/search.png" Width="100%" ChildGroupHeight="20%">  
                                    <ItemTemplate> 
                                        <telerik:RadComboBox ID="RadComboBox1" runat="server" Height="150px" Width="100%" 
                                            EnableAutomaticLoadOnDemand="True" AutoPostBack="true" Skin="Outlook" EmptyMessage="Søg" 
                                            DataSourceID="ObjectDataSource1" ShowMoreResultsBox="true" DataTextField="CLLH_x0020_Claim_x0020_Number" 
                                            DataValueField="CLLH_x0020_Claim_x0020_Number">  
                                        </telerik:RadComboBox> 
                                    </ItemTemplate> 
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="New Cases" Expanded="true" ImageUrl="~/images/icons/new.png" Width="100%" ChildGroupHeight="30%">  
                                    <Items> 
                                        <telerik:RadPanelItem> 
                                            <ItemTemplate> 
                                                <telerik:RadGrid ID="rgNewCases" runat="server" AllowSorting="True" GridLines="None" 
                                                    DataSourceID="odsNewCases" > 
                                                    <MasterTableView AutoGenerateColumns="False" DataSourceID="odsNewCases" DataKeyNames="CLLH_x0020_Claim_x0020_Number" 
                                                        Width="100%">  
                                                        <RowIndicatorColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </RowIndicatorColumn> 
                                                        <ExpandCollapseColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </ExpandCollapseColumn> 
                                                        <ItemStyle VerticalAlign="top" /> 
                                                        <AlternatingItemStyle VerticalAlign="top" /> 
                                                        <Columns> 
                                                            <telerik:GridBoundColumn DataField="CLLH_x0020_Claim_x0020_Number" HeaderText="Cllh claim nr." 
                                                                HeaderStyle-Wrap="false" SortExpression="CLLH_x0020_Claim_x0020_Number" UniqueName="CLLH_x0020_Claim_x0020_Number" 
                                                                HeaderStyle-Width="30%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Client" HeaderText="Client" SortExpression="Client" 
                                                                UniqueName="Client" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Insured_x0020_Name" HeaderText="Insured" SortExpression="Insured_x0020_Name" 
                                                                UniqueName="Insured_x0020_Name" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                        </Columns> 
                                                    </MasterTableView> 
                                                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">  
                                                        <Selecting AllowRowSelect="true" /> 
                                                        <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                                                    </ClientSettings> 
                                                </telerik:RadGrid> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="My followups" Expanded="true" ImageUrl="~/images/icons/followup.png" Width="100%" ChildGroupHeight="30%">  
                                    <Items> 
                                        <telerik:RadPanelItem> 
                                            <ItemTemplate> 
                                                <telerik:RadGrid ID="rgFollowUps" runat="server" AllowSorting="True" GridLines="None" 
                                                    DataSourceID="odsDSFollowups" > 
                                                    <ClientSettings EnablePostBackOnRowClick="true">  
                                                        <Selecting AllowRowSelect="true" /> 
                                                    </ClientSettings> 
                                                    <MasterTableView AutoGenerateColumns="False" DataSourceID="odsDSFollowups" DataKeyNames="CLLHClaimNumber" 
                                                        Width="100%">  
                                                        <RowIndicatorColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </RowIndicatorColumn> 
                                                        <ExpandCollapseColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </ExpandCollapseColumn> 
                                                        <ItemStyle VerticalAlign="top" /> 
                                                        <AlternatingItemStyle VerticalAlign="top" /> 
                                                        <Columns> 
                                                            <telerik:GridBoundColumn DataField="CLLHClaimNumber" HeaderText="Cllh claim nr." 
                                                                HeaderStyle-Wrap="false" SortExpression="CLLHClaimNumber" UniqueName="CLLHClaimNumber" 
                                                                HeaderStyle-Width="30%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Client" HeaderText="Client" SortExpression="Client" 
                                                                UniqueName="Client" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="InsuredName" HeaderText="Insured" SortExpression="InsuredName" 
                                                                UniqueName="InsuredName" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                        </Columns> 
                                                    </MasterTableView> 
                                                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">  
                                                        <Selecting AllowRowSelect="true" /> 
                                                        <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                                                    </ClientSettings> 
                                                </telerik:RadGrid> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Text="My opened cases" Expanded="True" ImageUrl="~/images/icons/star.png" Width="100%" ChildGroupHeight="20%">  
                                    <Items> 
                                        <telerik:RadPanelItem> 
                                            <ItemTemplate> 
                                                <telerik:RadGrid ID="rgMyOpenedCases" runat="server" AllowSorting="True" GridLines="None" 
                                                    DataSourceID="odsMyOpenCases" > 
                                                    <ClientSettings EnablePostBackOnRowClick="true">  
                                                        <Selecting AllowRowSelect="true" /> 
                                                    </ClientSettings> 
                                                    <MasterTableView AutoGenerateColumns="False" DataSourceID="odsMyOpenCases" DataKeyNames="CLLH_x0020_Claim_x0020_Number" 
                                                        Width="100%">  
                                                        <RowIndicatorColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </RowIndicatorColumn> 
                                                        <ExpandCollapseColumn> 
                                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                                        </ExpandCollapseColumn> 
                                                        <ItemStyle VerticalAlign="top" /> 
                                                        <AlternatingItemStyle VerticalAlign="top" /> 
                                                        <Columns> 
                                                            <telerik:GridBoundColumn DataField="CLLH_x0020_Claim_x0020_Number" HeaderText="Cllh claim nr." 
                                                                HeaderStyle-Wrap="false" SortExpression="CLLH_x0020_Claim_x0020_Number" UniqueName="CLLH_x0020_Claim_x0020_Number" 
                                                                HeaderStyle-Width="30%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Client" HeaderText="Client" SortExpression="Client" 
                                                                UniqueName="Client" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Insured_x0020_Name" HeaderText="Insured" SortExpression="Insured_x0020_Name" 
                                                                UniqueName="Insured_x0020_Name" HeaderStyle-Width="35%">  
                                                            </telerik:GridBoundColumn> 
                                                        </Columns> 
                                                    </MasterTableView> 
                                                    <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnablePostBackOnRowClick="true">  
                                                        <Selecting AllowRowSelect="true" /> 
                                                        <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                                                    </ClientSettings> 
                                                </telerik:RadGrid> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelBar> 
                </telerik:RadAjaxPanel> 
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetClaimsNumberList" TypeName="CLLH.TPA.WebCommon" /> 
                <asp:ObjectDataSource ID="odsNewCases" runat="server" SelectMethod="GetNewCases" TypeName="CLLH.TPA.WebCommon" /> 
                <asp:ObjectDataSource ID="odsDSFollowups" runat="server" SelectMethod="GetFollowups" TypeName="CLLH.TPA.WebCommon" /> 
                <asp:ObjectDataSource ID="odsMyOpenCases" runat="server" SelectMethod="GetMyOpenedCases" TypeName="CLLH.TPA.WebCommon" />           </div> 
        </div> 
    </form> 
</body> 
</html> 


Your quick response in this regard will be highly appreciated.

Kamen Bundev
Telerik team
 answered on 25 Jun 2010
1 answer
161 views
Hi,

I am using radtreeview in asp:update panel,since my requirement is : i am having a masterpage,on left hand side i am having a treeview,on click of the treeview items i am navigating to respective page in the contentplaceholder on the right hand side of the masterpage,the problem is whenever i click on treeview item the entire page is getting postback,i don't want to pastback the entire page,i need only content placeholder to postback

Please help me to resolve this issue...

Thanks!
Srinivasa Rao R
Nikolay Tsenkov
Telerik team
 answered on 25 Jun 2010
1 answer
114 views

Hello All,

 I have a DropDown box inside a FormView, I have and even fireing on the selected index changed, but when I try and assigning the selected value or selected item of the DropDownList to a variable I get the great error “Object reference not set to an instance of an object.”

 

My Code is attached

 

Form

 

    <table style="width: 100%;">  
        <tr> 
            <td> 
                <telerik:RadGrid ID="StockAdjustmentsRadGrid" runat="server"   
                                 AllowPaging="True"   
                                 AllowSorting="True"   
                                 GridLines="None"   
                                 DataSourceID="objDsGetAllAdjustments">  
                    <MasterTableView AutoGenerateColumns="False" DataKeyNames="StockAdjustmentId" DataSourceID="objDsGetAllAdjustments">  
                        <Columns> 
                            <telerik:GridBoundColumn DataField="StockAdjustmentId" DataType="System.Int32" HeaderText="Stock Adjustment Id" ReadOnly="True" SortExpression="StockAdjustmentId" UniqueName="StockAdjustmentId" /> 
                            <telerik:GridBoundColumn DataField="ItemCode" HeaderText="Item Code" ReadOnly="True" SortExpression="ItemCode" UniqueName="ItemCode" /> 
                            <telerik:GridBoundColumn DataField="PrintRoomName" HeaderText="Print Room" ReadOnly="True" SortExpression="PrintRoomName" UniqueName="PrintRoomName" /> 
                            <telerik:GridBoundColumn DataField="Date" DataType="System.DateTime" HeaderText="Date" SortExpression="Date" UniqueName="Date" /> 
                            <telerik:GridBoundColumn DataField="AdjustmentAmount" DataType="System.Decimal" HeaderText="AdjustmentAmount" SortExpression="AdjustmentAmount" UniqueName="AdjustmentAmount" /> 
                            <telerik:GridBoundColumn DataField="AdjustmentReason" HeaderText="AdjustmentReason" SortExpression="AdjustmentReason" UniqueName="AdjustmentReason" /> 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings> 
                        <Selecting AllowRowSelect="True" /> 
                    </ClientSettings> 
                </telerik:RadGrid> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                <asp:FormView ID="StockAdjustmentFormView" runat="server"   
                              DataKeyNames="StockAdjustmentId"   
                              DataSourceID="objDsStockAdjustment"   
                              DefaultMode="Insert" 
                              Width="960px">  
                    <InsertItemTemplate> 
                        <table style="width: 100%;">  
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="ItemCodeLabel" runat="server" meta:resourcekey="ItemCodeLabel" /></td>  
                                <td class="MasterFilesDataCells">  
                                    <telerik:RadComboBox ID="ItemCodeRadComboBox" Runat="server"   
                                                         DataSourceID="objDsItemNames"   
                                                         DataTextField="ItemCode"   
                                                         DataValueField="ItemId"   
                                                         AppendDataBoundItems="True" 
                                                         OnSelectedIndexChanged="ItemCodeRadComboBox_SelectedIndexChanged"   
                                                         AutoPostBack="True"   
                                                         CausesValidation="False">     
                                        <Items> 
                                            <telerik:RadComboBoxItem runat="server" Selected="True" text="Select An Item" Value="-1" /> 
                                        </Items> 
                                    </telerik:RadComboBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="PrintroomNamesLabel" runat="server" meta:resourcekey="PrintroomNamesLabel" /></td>  
                                <td class="MasterFilesDataCells"><uc2:PrintroomNames ID="PrintroomNames1" runat="server" SelectedValue='<%# Bind("PrintRoomName") %>'  /></td>  
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="ItemCostLabel" runat="server" meta:resourcekey="ItemCostLabel" /></td>  
                                  
                                <td class="MasterFilesDataCells">  
                                    <asp:Label ID="LabelItemCost" runat="server" Text='<%# Bind("ItemCost") %>' /> 
                                </td> 
                            </tr> 
                             <tr> 
                                <td colspan="2">  
                                    <asp:RadioButton ID="RadioButtonAdjustUp" runat="server" Text="Adjust Up" GroupName="AdjustDirection" Checked='<%# Bind("AdjustDirectionUp") %>' /> 
                                    <asp:RadioButton ID="RadioButtonAdjustDown" runat="server" Text="Adjust Down" GroupName="AdjustDirection" Checked='<%# Bind("AdjustDirectionDown") %>' /> 
                                 </td> 
                            </tr> 
                            <tr> 
                                 <td class="MasterFilesLableCells"><asp:Label ID="AdjustmentAmountLabel" runat="server" meta:resourcekey="AdjustmentAmountLabel" /></td>  
                                <td><telerik:RadTextBox ID="AdjustmentAmountTextBox" runat="server" Text='<%# Bind("AdjustmentAmount") %>'  Skin="Windows7" /></td>  
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="AdjustmentDateLabel" runat="server" meta:resourcekey="AdjustmentDateLabel" /></td>  
                                <td class="MasterFilesDataCells">  
                                    <telerik:RadDatePicker ID="AdjustmentDateLabelRadDatePicker" runat="server" SelectedDate='<%# Bind("AdjustmentDate") %>' > 
                                    </telerik:RadDatePicker> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td colspan="2"><asp:Label ID="AdjustmentReasonLabel" runat="server" meta:resourcekey="AdjustmentReasonLabel" /></td>  
                            </tr> 
                            <tr> 
                                <td colspan="2">  
                                    <telerik:RadTextBox ID="AdjustmentReasonTextBox" runat="server" Text='<%# Bind("AdjustmentReason") %>' Rows="5" Width="450" Height="50" TextMode="MultiLine" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td><asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /></td>  
                                <td align="right"><asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /></td>  
                            </tr> 
                        </table> 
                    </InsertItemTemplate> 
                    <ItemTemplate> 
                        <table style="width: 100%;">  
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="ItemCodeLabel" runat="server" meta:resourcekey="ItemCodeLabel" /></td>  
                                <td class="MasterFilesDataCells"><asp:Label ID="ItemNames1" runat="server" text='<%# Bind("ItemName") %>' /></td>  
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="PrintroomNamesLabel" runat="server" meta:resourcekey="PrintroomNamesLabel" /></td>  
                                <td class="MasterFilesDataCells"><asp:Label ID="PrintroomNames1" runat="server" text='<%# Bind("PrintName") %>' /></td>  
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="ItemCostLabel" runat="server" meta:resourcekey="ItemCostLabel" /></td>  
                                <td class="MasterFilesDataCells"><asp:Label ID="Label1" runat="server" Text='<%# Bind("ItemCost") %>' /></td>  
                            </tr> 
                             <tr> 
                                <td colspan="2">  
                                    <asp:RadioButton ID="RadioButtonAdjustUp" runat="server" Text="Adjust Up" Enabled="false" GroupName="AdjustDirection" Checked='<%# Bind("AdjustDirectionUp") %>' /> 
                                    <asp:RadioButton ID="RadioButtonAdjustDown" runat="server" Text="Adjust Down" Enabled="false" GroupName="AdjustDirection" Checked='<%# Bind("AdjustDirectionDown") %>' /> 
                                 </td> 
                            </tr> 
                            <tr> 
                                 <td class="MasterFilesLableCells"><asp:Label ID="AdjustmentAmountLabel" runat="server" meta:resourcekey="AdjustmentAmountLabel" /></td>  
                                <td><telerik:RadTextBox ID="AdjustmentAmountTextBox" Enabled="false" runat="server" Text='<%# Bind("AdjustmentAmount") %>'  Skin="Windows7" /></td>  
                            </tr> 
                            <tr> 
                                <td class="MasterFilesLableCells"><asp:Label ID="AdjustmentDateLabel" runat="server" meta:resourcekey="AdjustmentDateLabel" /></td>  
                                <td class="MasterFilesDataCells"><telerik:RadDatePicker Enabled="false" ID="AdjustmentDateLabelRadDatePicker" runat="server" Skin="Windows7" SelectedDate='<%# Bind("AdjustmentDate") %>' /></td>  
                            </tr> 
                            <tr> 
                                <td colspan="2" class="MasterFilesLableCells"><asp:Label ID="AdjustmentReasonLabel" runat="server" meta:resourcekey="AdjustmentReasonLabel" /></td>  
                            </tr> 
                            <tr> 
                                <td colspan="2" class="MasterFilesDataCells">  
                                    <telerik:RadTextBox ID="AdjustmentReasonTextBox" runat="server" Text='<%# Bind("AdjustmentReason") %>'  Skin="Windows7" Rows="5" Width="450" Height="50" TextMode="MultiLine" /> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td><asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" /></td>  
                                <td align="right"><asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /></td>  
                            </tr> 
                        </table> 
                    </ItemTemplate> 
                </asp:FormView> 
 
            </td> 
        </tr> 
    </table> 

Code Behind

 

Imports SBIS.FMSuite.Items.ItemMasterDAL  
Partial Public Class StockAdjustment  
 
    Inherits System.Web.UI.Page  
 
 
    Protected Sub ItemCodeRadComboBox_SelectedIndexChanged(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)  
        Dim ItemId As String 
        Dim ItemCodeRadComboBox As Telerik.Web.UI.RadComboBox = CType(FindControl("ItemCodeRadComboBox"), Telerik.Web.UI.RadComboBox)  
        Dim LabelItemCost As Label = CType(FindControl("LabelItemCost"), Label)  
 
        If ItemCodeRadComboBox.SelectedValue.ToString IsNot Nothing Then 
            ItemId = ItemCodeRadComboBox.SelectedValue  
        Else 
            ItemId = 560  
        End If 
 
        Dim ItemsAPI As New SBIS.FMSuite.Items.ItemMasterBLL  
        Dim Items As ItemsDataTable = ItemsAPI.GetItemsByItemID(ItemId)  
        Dim Item As SBIS.FMSuite.Items.ItemMasterDAL.ItemsRow = Items(0)  
        Try 
            If Item.CostingMethod = "Last cost price" Then 
                LabelItemCost.Text = Item.LastCostPrice  
            Else 
                LabelItemCost.Text = Item.AverageCostPrice  
            End If 
        Catch ex As Exception  
            LabelItemCost.Text = ex.Message.ToString  
        End Try 
 
    End Sub 
 
End Class 

Thank you in advance

Veronica
Telerik team
 answered on 25 Jun 2010
1 answer
255 views
I have a RadTabStrip control in which contails multiple RadTabs associated with the RadPageView. In each pageview, there are several web controls like textbox, checkbox. To support keyboard accessibility, when RadTab is selected by pressing enter key, a pageview is shown, and the first control in pageview needs to be set on focus for user to enter input. But so far, you have to tab through all RadTabs and then get focus on the controls in pageview. How can I change the tab order to the controls in pageview when the RadTab is selected?
Yana
Telerik team
 answered on 25 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?