This is a migrated thread and some comments may be shown as answers.

Pageload problem with AutoPostback True

0 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
pavan
Top achievements
Rank 1
pavan asked on 25 Nov 2015, 04:29 PM

I have two rad combo boxes on my web page radcombo1 and radcombo2, when I select the radcombo1 the page reload is happening. I dont want page reload to happen I want the radcombo to show the values. i.e radcombo2 values are based on the selection of radcombo1. and also to select radcombo2 before that radcombo1 should be selected. Here i tried to implement this using the   radajaxmanager. But still the page load is happening. Need help.

 

testradcombo.aspx

 

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

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
        

    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <div>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="RadComboBox1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadComboBox1"></telerik:AjaxUpdatedControl>
                                <telerik:AjaxUpdatedControl ControlID="RadComboBox2" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>                                
                            </UpdatedControls>
                        </telerik:AjaxSetting>                        
                    </AjaxSettings>
                </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                </telerik:RadAjaxLoadingPanel>
        <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true">
            <Items>
                               <telerik:RadComboBoxItem runat="server" Text="Informational" Value="5" />
                                <telerik:RadComboBoxItem runat="server" Text="Enhancement" Value="4" />
                                <telerik:RadComboBoxItem runat="server" Text="Maintenance" Value="3" /> 
                                <telerik:RadComboBoxItem runat="server" Text="Problem" Value="2" />  
                                <telerik:RadComboBoxItem runat="server" Text="Outage" Value="1" />         
                              </Items>
        </telerik:RadComboBox>
        
        <telerik:RadComboBox ID="RadComboBox2" runat="server">
            <Items>
                               <telerik:RadComboBoxItem runat="server" Text="Infor" Value="5" />
                                <telerik:RadComboBoxItem runat="server" Text="Enha" Value="4" />
                                <telerik:RadComboBoxItem runat="server" Text="Main" Value="3" /> 
                                <telerik:RadComboBoxItem runat="server" Text="Prob" Value="2" />  
                                <telerik:RadComboBoxItem runat="server" Text="Outa" Value="1" />         
                              </Items>
        </telerik:RadComboBox>

    </div>
    </form>
</body>
</html>

 

 

 

 

code behind: testradcombo.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 testradcombo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            RadComboBox2.Visible = false;
        }
    }
}

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
pavan
Top achievements
Rank 1
Share this question
or