Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
102 views
I have a problem with radconfirm control.

Scenario: master/Page

If I use resources does not work, but If I hardcode the title and text works perfectly:
(Resources exists, and fill variables ok.)
      

It is my code:

   if(Master.Organization.CommunityHasUser(GetId()))
                {
                    textMessage = _resources.GetString("DeleteCommunityWithUserText",
                                                       new CultureInfo(Master.Culture)).Replace("{0}",
                                                                                                Session["Name"].ToString
                                                                                                    ());
                }else
                {
                    textMessage = _resources.GetString("DeleteCommunityText", new CultureInfo(Master.Culture)).Replace("{0}", Session["Name"].ToString());
                }
              


                string titleMessage = _resources.GetString("DeleteCommunityTitle", new CultureInfo(Master.Culture)).Replace("{0}", Session["Name"].ToString());


                RadWindowManager1.RadConfirm(textMessage,"confirmCallBackFn", 330,100, null,titleMessage);

does not show radconfirm


but if I do this:

string  textMessage  ="Test";
string titleMessage  ="Message";

     RadWindowManager1.RadConfirm(textMessage,"confirmCallBackFn", 330,100, null,titleMessage); 

Show the radconfirm and works perfectly.

Please I need help!!!



July
Top achievements
Rank 2
 answered on 12 Jun 2012
1 answer
78 views
hi all

I have a hierachical rad grid in my page
this grid has up to 3 level and each row has a template field that contains rad numeric text box for "grade" and 1 column for "max grade"

user must enter grade for each child in last level. then in client side, I must check that grade:
1)this grade can't upper than max_grade
2)sum of grade of childes must be calculate for grade of their parent

this is my grid:
<telerik:RadGrid ID="gv_cheque_list" runat="server" GridLines="None" Width="100%"
                    AllowSorting="True" AutoGenerateColumns="False" ShowFooter="True" OnDetailTableDataBind="gv_cheque_list_DetailTableDataBind"
                    OnItemCommand="gv_cheque_list_ItemCommand" Skin="Web20" OnItemDataBound="gv_cheque_list_ItemDataBound">
                    <AlternatingItemStyle BackColor="#a7bcdb" />
                    <MasterTableView AllowSorting="True" DataKeyNames="assessment_parameter_id" Dir="RTL"
                        Font-Names="Tahoma" HeaderStyle-HorizontalAlign="Center" HorizontalAlign="Center"
                        HierarchyLoadMode="Client" ItemStyle-HorizontalAlign="Center" HeaderStyle-BackColor="#99CCFF" >
                        <AlternatingItemStyle BackColor="#a7bcdb" />
                        <DetailTables>
                            <telerik:GridTableView runat="server" Name="ChequeList" DataKeyNames="assessment_parameter_id"
                                Font-Names="Tahoma" HierarchyLoadMode="Client" Dir="RTL" NoDetailRecordsText="it hasn't child" >
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="parent_id" MasterKeyField="assessment_parameter_id" />
                                </ParentTableRelation>
                                <AlternatingItemStyle BackColor="#a7bcdb" />
                                <HeaderStyle HorizontalAlign="Center" CssClass="detailTableLevel1" />
                                <ExpandCollapseColumn>
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridTemplateColumn HeaderText="cheque_list_id" UniqueName="cheque_list_id"
                                        Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_cheque_list_id" runat="server" Text='<%# Bind("cheque_list_id") %>' />
                                        </ItemTemplate>
                                        <HeaderStyle Width="50px" />
                                        <ItemStyle Width="50px" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="assessment_parameter_id" UniqueName="assessment_parameter_id"
                                        Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_assessment_parameter_id" runat="server" Text='<%# Bind("assessment_parameter_id") %>' />
                                        </ItemTemplate>
                                        <HeaderStyle Width="50px" />
                                        <ItemStyle Width="50px" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="parent_id" UniqueName="parent_id" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_parent_id" runat="server" Text='<%# Bind("parent_id") %>' />
                                        </ItemTemplate>
                                        <HeaderStyle Width="50px" />
                                        <ItemStyle Width="50px" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="child_count" UniqueName="child_count" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_child_count" runat="server" Text='<%# Bind("child_count") %>' />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="type" UniqueName="type" Visible="false">
                                        <ItemTemplate>
                                            <asp:Label ID="lbl_type" runat="server" Text='<%# Bind("type") %>' />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn DataField="assessment_parameter_code" EmptyDataText="----"
                                        HeaderText="assessment_parameter_code" Resizable="true" UniqueName="assessment_parameter_code">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="parameter_name" EmptyDataText="----" HeaderText="parameter_name"
                                        Resizable="true" UniqueName="parameter_name">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="max_grade" EmptyDataText="----" HeaderText="max_grade"
                                        Resizable="true" UniqueName="max_grade">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridTemplateColumn HeaderText="grade" UniqueName="grade">
                                        <ItemTemplate>
                                            <telerik:RadNumericTextBox ID="txt_grade" runat="server" Text='<%# Bind("grade") %>'>
                                               <ClientEvents OnValueChanged="txt_grade_value_changed" />
                                            </telerik:RadNumericTextBox>
                                            <asp:HiddenField ID="hd_type" runat="server" Value='<%# Bind("type") %>' />
                                            <asp:HiddenField ID="hd_parent_id" runat="server" Value='<%# Bind("parent_id") %>' />
                                            <asp:HiddenField ID="hd_ass_id" runat="server" Value='<%# Bind("assessment_parameter_id") %>' />
                                            <asp:HiddenField ID="hd_child_count" runat="server" Value='<%# Bind("child_count") %>' />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <DetailTables>
                                    <telerik:GridTableView runat="server" Name="ChequeListDetail" Dir="RTL"  DataKeyNames="assessment_parameter_id"
                                        HierarchyLoadMode="Client" NoDetailRecordsText="it hasn't child"
                                        Font-Names="Tahoma">
                                        <ParentTableRelation>
                                            <telerik:GridRelationFields DetailKeyField="parent_id" MasterKeyField="assessment_parameter_id" />
                                        </ParentTableRelation>
                                        <HeaderStyle HorizontalAlign="Center" CssClass="detailTableLevel2" />
                                        <Columns>
                                            <telerik:GridTemplateColumn HeaderText="cheque_list_id" UniqueName="cheque_list_id"
                                                Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_cheque_list_id" runat="server" Text='<%# Bind("cheque_list_id") %>' />
                                                </ItemTemplate>
                                                <HeaderStyle Width="50px" />
                                                <ItemStyle Width="50px" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="assessment_parameter_id" UniqueName="assessment_parameter_id"
                                                Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_assessment_parameter_id" runat="server" Text='<%# Bind("assessment_parameter_id") %>' />
                                                </ItemTemplate>
                                                <HeaderStyle Width="50px" />
                                                <ItemStyle Width="50px" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="parent_id" UniqueName="parent_id" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_parent_id" runat="server" Text='<%# Bind("parent_id") %>' />
                                                </ItemTemplate>
                                                <HeaderStyle Width="50px" />
                                                <ItemStyle Width="50px" />
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="child_count" UniqueName="child_count" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_child_count" runat="server" Text='<%# Bind("child_count") %>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridTemplateColumn HeaderText="type" UniqueName="type" Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label ID="lbl_type" runat="server" Text='<%# Bind("type") %>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                            <telerik:GridBoundColumn DataField="assessment_parameter_code" EmptyDataText="----"
                                                HeaderText="assessment_parameter_code" Resizable="true" UniqueName="assessment_parameter_code">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="parameter_name" EmptyDataText="----" HeaderText="parameter_name"
                                                Resizable="true" UniqueName="parameter_name">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridBoundColumn DataField="max_grade" EmptyDataText="----" HeaderText="max_grade"
                                                Resizable="true" UniqueName="max_grade">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridTemplateColumn HeaderText="grade" UniqueName="grade">
                                                <ItemTemplate>
                                                    <telerik:RadNumericTextBox ID="txt_grade" runat="server" Text='<%# Bind("grade") %>'>
                                                       <ClientEvents OnValueChanged="txt_grade_value_changed" />
                                                    </telerik:RadNumericTextBox>
                                                    <asp:HiddenField ID="hd_type" runat="server" Value='<%# Bind("type") %>' />
                                                    <asp:HiddenField ID="hd_parent_id" runat="server" Value='<%# Bind("parent_id") %>' />
                                                    <asp:HiddenField ID="hd_ass_id" runat="server" Value='<%# Bind("assessment_parameter_id") %>' />
                                                    <asp:HiddenField ID="hd_child_count" runat="server" Value='<%# Bind("child_count") %>' />
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </telerik:GridTableView>
                                </DetailTables>
                            </telerik:GridTableView>
                        </DetailTables>
                        <NoRecordsTemplate>
                             
                        </NoRecordsTemplate>
                        <CommandItemSettings ShowAddNewRecordButton="false" />
                        <ExpandCollapseColumn Visible="True" ExpandImageUrl="Images/plus.png" CollapseImageUrl="Images/minus.png"
                            ButtonType="ImageButton">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="cheque_list_id" UniqueName="cheque_list_id"
                                Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_cheque_list_id" runat="server" Text='<%# Bind("cheque_list_id") %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="parent_id" UniqueName="parent_id" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_parent_id" runat="server" Text='<%# Bind("parent_id") %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="child_count" UniqueName="child_count" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_child_count" runat="server" Text='<%# Bind("child_count") %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="type" UniqueName="type" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbl_type" runat="server" Text='<%# Bind("type") %>' />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridBoundColumn DataField="assessment_parameter_code" EmptyDataText="----"
                                HeaderText="assessment_parameter_code" Resizable="true" UniqueName="assessment_parameter_code">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="parameter_name" EmptyDataText="----" HeaderText="parameter_name"
                                Resizable="true" UniqueName="parameter_name">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="max_grade" EmptyDataText="----" HeaderText="max_grade"
                                Resizable="true" UniqueName="max_grade">
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn HeaderText="grade" UniqueName="grade">
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox ID="txt_grade" runat="server" Text='<%# Bind("grade") %>'>
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                        </Columns>
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </MasterTableView>
                    <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                        <Resizing AllowColumnResize="True" ResizeGridOnColumnResize="false" />
                    </ClientSettings>
                </telerik:RadGrid>
 

and in client side i write this function:
<script language="JavaScript1.2" type="text/javascript">
    function txt_grade_value_changed(sender, args) {
        debugger;
        var newValue = args.get_newValue();
        var oldValue = args.get_oldValue();
      //  var d_i = sender.get_parent().get_dataItems();
  
  
        var curr_tr = $('input[id="' + sender._clientID + '"]').closest("tr"); 
        var father_tr = $('input[id="' + sender._clientID + '"]').closest("table").closest("tr").prev();
  
        var father_max_grade = father_tr[0].cells[3].innerText;
  
        if (newValue > curr_max_grade)
            alert('You can continueenter thistory grade');
  
  
  
        var current_grade = 0;
  
        try {
            current_grade = $(curr_tr[0].cells[3].children[0]).closest("span")[0].children[0].value; 
            var parent_id = curr_tr[0].cells[3].children[2].value;
            var curr_id = curr_tr[0].cells[3].children[3].value;
            var curr_max_grade = curr_tr[0].cells[2].innerText;
  
        }
        catch (Error) {
  
            current_grade = $(curr_tr[0].cells[4].children[0]).closest("span")[0].children[0].value;
            var parent_id = curr_tr[0].cells[4].children[2].value;
            var curr_id = curr_tr[0].cells[4].children[3].value;
            var curr_max_grade = curr_tr[0].cells[3].innerText;
  
        }
  
        var father_grade_txt = $(father_tr[0].cells[4].children[0]).closest("span")[0].children[0];
  
        var child_row_array = new Array(10);
        var i = 0;
        var curr_tr2 = curr_tr;
  
        child_row_array[i] = curr_tr;
        i++;
  
        try {
            do {
                if (curr_tr2[0] != undefined && curr_tr2[0].cells[3].children[2].value != undefined && curr_tr2[0].cells[3].children[2].value == parent_id && curr_tr2[0].cells[3].children[3].value != curr_id) {
  
                    child_row_array[i] = curr_tr2;
                    i++;
                }
                curr_tr2 = curr_tr2.next('tr');
  
  
            } while (curr_tr2 && curr_tr2[0] && curr_tr2[0].cells[3].children[2].value != undefined && curr_tr2[0].cells[3].children[3].value != curr_id)
  
            curr_tr2 = curr_tr;
  
            do {
                if (curr_tr2[0] != undefined && curr_tr2[0].cells[3].children[2].value != undefined && curr_tr2[0].cells[3].children[2].value == parent_id && curr_tr2[0].cells[3].children[3].value != curr_id) {
  
                    child_row_array[i] = curr_tr2;
                    i++;
                }
                curr_tr2 = curr_tr2.prev('tr');
  
            } while (curr_tr2 && curr_tr2[0] && curr_tr2[0].cells[3].children[2].value != undefined && curr_tr2[0].cells[3].children[3].value != curr_id)
        }
        catch (Error) {
            try {
                do {
  
                    if (curr_tr2[0] != undefined && curr_tr2[0].cells[4].children[2].value != undefined && curr_tr2[0].cells[4].children[2].value == parent_id && curr_tr2[0].cells[4].children[3].value != curr_id) {
  
                        child_row_array[i] = curr_tr2;
                        i++;
                    }
                    curr_tr2 = curr_tr2.next('tr');
  
  
                } while (curr_tr2 && curr_tr2[0] && curr_tr2[0].cells[4].children[2].value != undefined && curr_tr2[0].cells[4].children[3].value != curr_id)
            }
            catch (Error) {
            }
  
            curr_tr2 = curr_tr;
            try {
                do {
                    if (curr_tr2[0] != undefined && curr_tr2[0].cells[4].children[2].value != undefined && curr_tr2[0].cells[4].children[2].value == parent_id && curr_tr2[0].cells[4].children[3].value != curr_id) {
  
                        child_row_array[i] = curr_tr2;
                        i++;
                    }
                    curr_tr2 = curr_tr2.prev('tr');
  
                } while (curr_tr2 && curr_tr2[0] && curr_tr2[0].cells[4].children[2].value != undefined && curr_tr2[0].cells[4].children[3].value != curr_id)
            }
            catch (Error) {
            }
        }
        var array_lenght = i;
        var count = 0;
        var sum = 0.00;
    
        for (var i = 0; i < array_lenght; i++) {
            try {
                if (child_row_array[i][0].cells[3].firstChild.childNodes[0].value != "")
                    sum = sum + parseFloat(child_row_array[i][0].cells[3].firstChild.childNodes[0].value);
            }
            catch (Error) {
                if (child_row_array[i][0].cells[4].firstChild.childNodes[0].value != "")
                    sum = sum + parseFloat(child_row_array[i][0].cells[4].firstChild.childNodes[0].value);
            }
        }
  
        father_grade_txt.value = sum;
  
  
  
    }
  
</script>


but it has error on finde brothers row.

how can I do that easily?
how can I find brothers of a row and calculate sum of their grade?

Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Jun 2012
1 answer
189 views
I have an application scenario where the user is allowed to pick more than one item from more than one category of items.  I've solved this by creating a RadListView that will be bound to the categories and then using an ItemTemplate in the ListView to create a RadListBox for each category that will allow the user to select options in each category.  Everything was working great until one of the categories ended up having over 10,000 possible options to choose from.  I decided to try to solve this problem by setting EnableLoadOnDemand to true on the RadListBox in the ItemTemplate so it wouldn't try to render every item for every category to the page when it first loaded.  However, this doesn't work at all.  If I try to bind the ListView on Page Load, I get a weird error.  If I bind the ListView later (on a button click) I get blank RadListBoxes.  I've linked to a sample web project to show you what I'm trying to do.  Is this even possible?

http://www.iconstudios.org/RadListBoxinTemplate.zip

If I can't use EnableLoadOnDemand to accomplish this, what other strategies do you recommend for selecting from a huge list?

Thanks,

Patrick
Peter Filipov
Telerik team
 answered on 12 Jun 2012
0 answers
80 views
Hi,
i want to edit uploaded files such as MS.Excel and Ms.Word and note in my webpage 
(without download and again upload it).
is there a special tool for this topic?
please help me.
thanks,
Azadeh
Azadeh
Top achievements
Rank 1
 asked on 12 Jun 2012
1 answer
130 views
I have a RadScheduler in an MVC3 web application, using a web service as my data source.  I have two resources - locations and departments.  I want to be able to select multiple departments.  I followed the documentation for "Implementing A Provider That Supports Multi-valued Resources" - but I am still only able to select one department from a drop down list. How do i allow multiple values for my resource?
Plamen
Telerik team
 answered on 12 Jun 2012
2 answers
78 views
Hello,

How could i assign multiple resources (users) to an appointment? I'm using RadComboCox as CheckBox (CheckBoxes="true" EnableCheckAllItemsCheckBox="true") :
<telerik:RadComboBox CheckBoxes="true" EnableCheckAllItemsCheckBox="true" runat="server" ID="UsersComboBox" DataTextField="Text" DataValueField="Key"
                           Width="80px" Skin="Default" SelectedValue='<%# Bind("UserID") %>' DataSource="<%# GetAvailableUsers(Container) %>">
                       </telerik:RadComboBox>
 
and i have made the following changes to the RadScheduler1_AppointmentCreated event with no result.

protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
   {
 
       List<string> users = new List<string>();
       foreach (Resource user in e.Appointment.Resources.GetResourcesByType("User"))
       {
           users.Add(user.Text);
       }
 
       if (users.Count > 0)
       {
           Label assignedTo = (Label)e.Container.FindControl("AssignedTo");
           assignedTo.Text = "Assigned to: " + string.Join(", ", users.ToArray());
       }
 
   }


How could i bind the users so as to have a result like: "Held by: Charlie, Alex"?

Thank you very much.
Plamen
Telerik team
 answered on 12 Jun 2012
1 answer
97 views
Actually my application is ECOM application....am using third party tool AspDotNetStoreFront..in one of my page using radcombobox, onloadondemand binding the data form the dataset for more details refer the following link http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx. and calling the ajax method from javascript.
I am using the .net frame work 3.5,actually i added telerik reference in web.config in between <handlers>

<add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />

and ajax reference
<location path="ajaxpro">
    <system.webServer>
      <handlers>
        <add verb="*" path="*.ashx" name="AjaxPro" type="AjaxPro.AjaxHandlerFactory,AjaxPro.2" />
      </handlers>
    </system.webServer>
  </location>
my problem is that in chrome combobox is not working means to say dropdown is not diplaying and on combo load am calling javascript function that also not happening ,onselected event is not  happening  and mozilla combobox part is working but ajax methods are not calling...am struggling for this days together but i dn't get solution ...finally i got doubt is it AspDotNetStoreFront will support rad contols and ajax?can anybody plz help out this ,below is my aspx page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="preregistration.aspx.cs" Inherits="PreRegistration" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="hdPreRegistration" runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>Student Registration</title>
    <script language="javascript" type = "text/javascript" src = "commonfunctions.js"></script>
    <link type='text/css' rel='stylesheet' href ="ecfstyle.css" />
   
</head>
<body >
    <form id="frmPreRegistration" method="post" runat="server">
    <asp:Panel ID="pnlPreRegistration" runat="server">
        <input type ="hidden" id="CourseID" runat="server"/>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <asp:Table ID="tblPreRegistration" CellSpacing="0" CellPadding="2" Width="100%" runat="server">
            <asp:TableRow>
                <asp:TableCell HorizontalAlign="left" VerticalAlign="top">
                    <asp:Image runat="server" ID="imgHdr" /><br />
                    <asp:Table ID="tblPreRegOuter" CellSpacing="0" CellPadding="2" Width="100%" runat="server">
                        <asp:TableRow>
                            <asp:TableCell HorizontalAlign="left" VerticalAlign="top">
                                <table width="100%">
                                    <tr id="trError" runat="server" visible="false">
                                        <td align="left" colspan="2">
                                            <asp:Label ID="lblError" runat="server" Style="font-family: Verdana; font-size: 11;
                                                font-weight: bold" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trNoData" runat="server">
                                        <td align="left" colspan="2">
                                            <asp:Label ID="lblNoData" runat="server" Style="font-family: Verdana; font-size: 11;
                                                font-weight: bold; color: Blue"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trStateCombo" runat="server" height="25px">
                                        <td width="25%" align="right">
                                            <asp:Label ID="lblState" runat="server" Text="State"></asp:Label>: 
                                        </td>
                                        <td align="left" width="75%">
                                             <telerik:RadComboBox ID="RadComboState" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select a state" OnClientLoad="onLoad" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true"  OnItemsRequested="RadComboState_ItemsRequested"
                                                OnClientSelectedIndexChanging="LoadInstitutionList">
                                            </telerik:RadComboBox>
                                        </td>
                                    </tr>
                                    <tr id="trInstitutionCombo" runat="server" height="25px">
                                        <td align="right" width="25%">
                                            <asp:Label ID="lblSelectInstitution" runat="server">Institution</asp:Label>: 
                                        </td>
                                        <td align="left" width="75%">
                                            <telerik:RadComboBox ID="RadComboInstitution" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select an institution" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                  EnableVirtualScrolling="true" OnItemsRequested="RadComboInstitution_ItemsRequested"
                                                  OnClientSelectedIndexChanging="LoadTermList">
                                            </telerik:RadComboBox>
                                        </td>
                                    </tr>
                                    <tr id="trTermCombo" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblSelectTerm" runat="server" Text="Term"></asp:Label>: 
                                        </td>
                                        <td align="left">
                                          <telerik:RadComboBox ID="RadComboTerm" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select a term" OnClientLoad="onLoad" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboTerm_ItemsRequested"
                                                OnClientSelectedIndexChanging="LoadCourseList" >
                                            </telerik:RadComboBox>
                                        </td>
                                    </tr>
                                    <tr id="trCourseCombo" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblSelectCourse" runat="server" Text="Course"></asp:Label>: 
                                        </td>
                                        <td align="left">
                                           <telerik:RadComboBox ID="RadComboCourse" runat="server" Width="250px" Height="150px"
                                                EmptyMessage="Select a course" EnableLoadOnDemand="True" ShowMoreResultsBox="true"
                                                EnableVirtualScrolling="true" OnItemsRequested="RadComboCourse_ItemsRequested"
                                                OnClientSelectedIndexChanging="LoadSectionList">
                                            </telerik:RadComboBox>
                                              
                                            <asp:LinkButton ID="lbnViewCourse"  OnClientClick="OpenCourse();" runat="server">View Course</asp:LinkButton>
                                        </td>
                                    </tr>
                                    <tr id="trSectionCombo" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblSection" runat="server">Section</asp:Label>: 
                                        </td>
                                        <td align="left">
                                            <telerik:RadComboBox ID="RadComboSection" runat="server" Width="250px" Height="150px"
                                                        EmptyMessage="Select a section" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedEventHandler"
                                                        EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                                                        OnItemsRequested="RadComboSection_ItemsRequested">
                                             </telerik:RadComboBox>
                                        </td>
                                    </tr>
                                    <tr id="trInstName" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblInstructorNameHdr" runat="server">Instructor Name</asp:Label>: 
                                        </td>
                                        <td align="left">
                                            <asp:Label ID="lblInstructorName" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trLocation" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblLocationHdr" runat="server">Location</asp:Label>: 
                                        </td>
                                        <td align="left">
                                            <asp:Label ID="lblLocation" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trTiming" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblTimingHdr" runat="server">Time</asp:Label>: 
                                        </td>
                                        <td align="left">
                                            <asp:Label ID="lblTiming" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trInsFreeTime" runat="server" height="25px">
                                        <td align="right">
                                            <asp:Label ID="lblInsFreeTime" runat="server">Free Time</asp:Label>: 
                                        </td>
                                        <td align="left">
                                            <asp:Label ID="lblFreeTime" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr id="trNext" runat="server">
                                        <td align="Center" colspan="2">
                                            <asp:Button ID="btnNext" runat="server" CssClass="ecfStyleButton" Width="75px" OnClick="btnNext_Click" Text="Continue" />
                                        </td>
                                    </tr>
                                </table><br/><br/>
                            </asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    </form>
     <script type="text/javascript">
         function GetSelectedState(sender, eventArgs) {
             var SelectedState;
             var combo = Telerik.Web.UI.RadComboBox.ComboBoxes[0];
             SelectedState = combo.get_value();
             var context = eventArgs.get_context();
             context["StateId"] = SelectedState;
         }
         function GetSelectedInstitution(sender, eventArgs) {
             var SelectedInstitution;
             var combo = Telerik.Web.UI.RadComboBox.ComboBoxes[1];
             SelectedInstitution = combo.get_value();
             var context = eventArgs.get_context();
             context["InstId"] = SelectedInstitution;
         }
         function onLoad(sender) {
             document.getElementById('trInstName').style.visibility = "hidden";
             document.getElementById('trLocation').style.visibility = "hidden";
             document.getElementById('trTiming').style.visibility = "hidden";
             document.getElementById('trInsFreeTime').style.visibility = "hidden";
             document.getElementById('trNext').style.visibility = "hidden";
             document.getElementById('lbnViewCourse').style.visibility = "hidden";
 
         }
         function LoadInstitutionList(sender, eventArgs) {
 
             var item = eventArgs.get_item();
             var CboInstitution = Telerik.Web.UI.RadComboBox.ComboBoxes[1];
             CboInstitution.set_text("select an instution");
             if (item.get_index() >= 0) {
                 CboInstitution.requestItems(item.get_value(), false);
             }
             else {
                 CboInstitution.set_text(" ");
                 CboInstitution.clearItems();
             }
         }
         function LoadTermList(sender, eventArgs) {
             var item = eventArgs.get_item();
             var CboTerm = Telerik.Web.UI.RadComboBox.ComboBoxes[2];
             CboTerm.set_text("select a term");
             if (item.get_index() >= 0) {
                 CboTerm.requestItems(item.get_value(), false);
             } else {
                 CboTerm.set_text(" ");
                 CboTerm.clearItems();
             }
         }
         function LoadCourseList(sender, eventArgs) {
             var item = eventArgs.get_item();
             var length = Telerik.Web.UI.RadComboBox.ComboBoxes.length;
             if (length == 5)
                 var CboCourse = Telerik.Web.UI.RadComboBox.ComboBoxes[3];
             else {
                 var CboCourse = Telerik.Web.UI.RadComboBox.ComboBoxes[1];
             }
 
             CboCourse.set_text("select a course");
             if (item.get_index() >= 0) {
                 CboCourse.requestItems(item.get_value(), false);
             }
             else {
                 CboCourse.set_text(" ");
                 CboCourse.clearItems();
             }
         }
         function LoadSectionList(sender, eventArgs) {
             var item = eventArgs.get_item();
             var CboSection = Telerik.Web.UI.RadComboBox.ComboBoxes[4];
             CboSection.set_text("select a section");
             if (item.get_index() >= 0) {
                 CboSection.requestItems(item.get_value(), false);
                 document.getElementById('CourseID').value = item.get_value();
             }
             else {
                 CboSection.set_text(" ");
                 CboSection.clearItems();
             }
         }
         function ChangeSection(SectionID) {
             if (SectionID != '-1') {
                 document.getElementById('lbnViewCourse').style.visibility = "visible";
                 document.getElementById('trInstName').style.visibility = "visible";
                 document.getElementById('trLocation').style.visibility = "visible";
                 document.getElementById('trTiming').style.visibility = "visible";
                 document.getElementById('trInsFreeTime').style.visibility = "visible";
                 document.getElementById('trNext').style.visibility = "visible";
                 var Data = ECOM_preregistration.getSectionDetails(SectionID).value;
                 if (Data == 0 || Data == null) {
                     document.getElementById('lblInstructorName').innerHTML = 'Not Specified';
                     document.getElementById('lblLocation').innerHTML = 'Not Specified';
                     document.getElementById('lblTiming').innerHTML = 'Not Specified';
                     document.getElementById('lblFreeTime').innerHTML = 'Not Specified';
                 } else {
                     var mySplitResult = Data.split("$");
                     if (mySplitResult[0].length == "0")
                         document.getElementById('lblTiming').innerHTML = 'Not Specified';
                     else
                         document.getElementById('lblTiming').innerHTML = mySplitResult[0];
                     ;
                     if (mySplitResult[1].length == "0") {
                         document.getElementById('lblLocation').innerHTML = 'Not Specified';
                     } else {
                         document.getElementById('lblLocation').innerHTML = mySplitResult[1];
                     }
                     if (mySplitResult[2].length == "0") {
                         document.getElementById('lblInstructorName').innerHTML = 'Not Specified';
                     } else {
                         document.getElementById('lblInstructorName').innerHTML = mySplitResult[2];
                     }
                     if (mySplitResult[3].length == "0") {
                         document.getElementById('lblFreeTime').innerHTML = 'Not Specified';
                     } else {
                         document.getElementById('lblFreeTime').innerHTML = mySplitResult[3];
                     }
                 }
             }
         }
         function OnClientSelectedIndexChangedEventHandler(sender, args) {
             var item = args.get_item();
             ChangeSection(item.get_value());
         }
         function OpenCourse() {
             var URl = ECOM_preregistration.getCourseDetails(document.getElementById('CourseID').value).value;
         }
    </script>
</body>
</html>
and aspx.cs file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using Educo.ELS.Course;
using Educo.ELS.Encryption;
using Educo.ELS.Portal;
using Educo.ELS.SystemSettings;
using Educo.ELS.Users;
using Telerik.Web.UI;
using AjaxPro;
using Educo.ELS.ErrorPublisher;
using Educo.QueryString;
 
 
public partial class preregistration : System.Web.UI.Page
{
    //Variables
    const char colSep = (char)195;
    string langFile = "Strings-En".ToString();
    int flagSuccess = 0;
    string institutionId = string.Empty;
    string bookBased = string.Empty;
    string ecfPath = string.Empty;
    private const int ItemsPerRequest = 10;
 
    //Objects
    SecureQueryString objSecureQS;
    DataSet dstRegistration;
    StringBuilder paramList = null;
    LocationSettings objState;
    Course objCourse;
    EncryptDecrypt objEncrypt;
    Portal objPortal;
    User objUser;
    CourseSetting objCourseSetting;
 
    private void Page_Load(object sender, System.EventArgs e)
    {
        try
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(preregistration),this.Page);
            Handling Path and style for title image and table
            imgHdr.ImageUrl = AppLogic.LocateImageURL("skins/skin_1/images/studentregistration.gif");
            tblPreRegOuter.Attributes.Add("style", AppLogic.AppConfig("BoxFrameStyle"));
          }
        catch (Exception error)
        {
            publishError(error);
        }
    }
 
    
 
    
 
    private DataSet PoulateStates()
    {
        //Objects
        dstRegistration = new DataSet();
        objState = new LocationSettings();
        paramList = new StringBuilder();
        paramList.Length = 0;
        int eduType = 0;
 
       
            RadComboState.Items.Clear();
 
             
 
           // if (ViewState["PORTALID"] != null && ViewState["COUNTRY"] != null && Session["EDUTYPE"] != null)
            if (ViewState["PORTALID"] != null && ViewState["COUNTRY"] != null )
            {
 
                trStateCombo.Visible = true;
                paramList.Append("1").Append(colSep).Append(ViewState["COUNTRY"].ToString());
                paramList.Append(colSep).Append("6").Append(colSep).Append(ViewState["PORTALID"].ToString());
 
                //7th Parameter only for schools
                string edType = "";
                if (Session["EDUTYPE"] != null)
                {
                    edType = Session["EDUTYPE"].ToString();
                }
 
                if (edType.Length > 1 && edType.Substring(1, 1) == "H")
                {
                    eduType = 1;
                }
 
                if (ViewState["COUNTRYNAME"].ToString().Substring(0, 2) == "ME")
                {
                    trStateCombo.Visible = false;
                }
                paramList.Append(colSep).Append("7").Append(colSep).Append(eduType);
                dstRegistration = objState.GetStates(paramList.ToString(), langFile);
                
            }
        return dstRegistration;
    }
 
    private DataSet populateInstitution(string StateId)
    {
        //Objects
        dstRegistration = new DataSet();
        objCourse = new Course();
        paramList = new StringBuilder();
        paramList.Length = 0;
 
        
        trInstitutionCombo.Visible = true;
        RadComboInstitution.Items.Clear();
         
       // if (RadComboState.SelectedValue != "-1" && ViewState["PORTALID"] != null && ViewState["COUNTRY"] != null && Session["EDUTYPE"] != null)
       // if (ViewState["PORTALID"] != null && ViewState["COUNTRY"] != null && Session["EDUTYPE"] != null)
          if (ViewState["PORTALID"] != null && ViewState["COUNTRY"] != null)
        {
            paramList.Append("1").Append(colSep).Append(ViewState["PORTALID"].ToString()).Append(colSep);
            paramList.Append("4").Append(colSep).Append(StateId).Append(colSep);
            paramList.Append("6").Append(colSep).Append("1");
            if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "USA")
            {
                if (Session["EDUTYPE"].ToString() == "UH")
                    paramList.Append(colSep).Append("7").Append(colSep).Append(1);
                else
                    paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "JAMAICA")
            {
                if (Session["EDUTYPE"].ToString() == "JH")
                    paramList.Append(colSep).Append("7").Append(colSep).Append(1);
                else
                    paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "PHILIPPINES")
            {
                if (Session["EDUTYPE"].ToString() == "PH")
                    paramList.Append(colSep).Append("7").Append(colSep).Append(1);
                else
                    paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "INDIA")
            {
                paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().Substring(0, 2) == "ME")
            {
                paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "MARSHALL ISLANDS")
            {
                if (Session["EDUTYPE"].ToString() == "MH")
                    paramList.Append(colSep).Append("7").Append(colSep).Append(1);
                else
                    paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            else if (ViewState["COUNTRYNAME"].ToString().ToUpper() == "NIGERIA")
            {
                if (Session["EDUTYPE"].ToString() == "NH")
                    paramList.Append(colSep).Append("7").Append(colSep).Append(1);
                else
                    paramList.Append(colSep).Append("7").Append(colSep).Append(0);
            }
            dstRegistration = objCourse.GetInstitutionList(paramList.ToString(), langFile);
        }
        return dstRegistration;
    }
 
    private DataSet populateTerm(string InstId)
    {
     
    //Objects
    dstRegistration = new DataSet();
    objCourse = new Course();
    paramList = new StringBuilder();
    paramList.Length = 0;
 
        trTermCombo.Visible = true;
        RadComboTerm.Items.Clear();
        if (RadComboInstitution.SelectedValue != "-1")
        {
            paramList.Append("1").Append(colSep).Append("").Append(colSep);
            if(RadComboInstitution.SelectedValue != "")
                paramList.Append("2").Append(colSep).Append(RadComboInstitution.SelectedValue).Append(colSep);
            else
                paramList.Append("2").Append(colSep).Append(InstId).Append(colSep);
            paramList.Append("3").Append(colSep).Append("CC");
 
            dstRegistration = objCourse.GetTerms(paramList.ToString(), langFile);
 
             
        }
        return dstRegistration;
 
    }
 
    private DataSet PopulateCourse(string TermId)
    {
         
        //Objects
        dstRegistration = new DataSet();
        objCourse = new Course();
        paramList = new StringBuilder();
        paramList.Length = 0;
 
       if (RadComboCourse.Enabled)
            {
                trCourseCombo.Visible = true;
                RadComboCourse.Items.Clear();
                 
 
                if (RadComboTerm.SelectedValue != "-1")
                {
                    if (ViewState["CALLEDFROM"] != null && ViewState["CALLEDFROM"].ToString() == "REP") //Inside Repeat
                    {
                        if (ViewState["USERID"] != null && ViewState["USERID"].ToString() != "0")
                        {
                            paramList.Append("1").Append(colSep).Append(TermId).Append(colSep);
                            paramList.Append("6").Append(colSep).Append("2").Append(colSep);
                            paramList.Append("7").Append(colSep).Append(ViewState["USERID"].ToString());
                            dstRegistration = objCourse.GetCourseForApproval(paramList.ToString(), langFile);
                        }
                    }
                    else if (ViewState["CALLEDFROM"] != null && ViewState["CALLEDFROM"].ToString() == "ADD")//Inside Add
                    {
                        if (ViewState["USERID"] != null && ViewState["USERID"].ToString() != "0")
                        {
                            paramList.Append("1").Append(colSep).Append(TermId).Append(colSep);
                            paramList.Append("6").Append(colSep).Append("1").Append(colSep);
                            paramList.Append("7").Append(colSep).Append(ViewState["USERID"].ToString());
                            dstRegistration = objCourse.GetCourseForApproval(paramList.ToString(), langFile);
                        }
                    }
                    else //Outside
                    {
                        paramList.Append("1").Append(colSep).Append(TermId).Append(colSep);
                        paramList.Append("2").Append(colSep).Append("SE");
                        dstRegistration = objCourse.GetCourseForApproval(paramList.ToString(), langFile);
                    }
 
                    
                }
            }
        return dstRegistration;
    }
 
    private DataSet PopulateSection(string CourseId)
    {
        
        //Objects
        dstRegistration = new DataSet();
        objCourse = new Course();
        paramList = new StringBuilder();
        paramList.Length = 0;
 
 
            trSectionCombo.Visible = true;
            RadComboSection.Items.Clear();
             
            if (RadComboTerm.SelectedValue != "-1" && RadComboCourse.SelectedValue != "-1")
            {
                paramList.Append("2").Append(colSep).Append(Session["TermId"].ToString()).Append(colSep);
                paramList.Append("3").Append(colSep).Append(CourseId);
                dstRegistration = objCourse.GetSection(paramList.ToString(), langFile);
 
                
            }
        return dstRegistration;
    }
 
     private  string GetStatusMessage(int offset, int total)
    {
        if (total <= 0)
            return "No matches";
 
        return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", offset, total);
    }
 
    protected void RadComboState_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboState.Items.Clear();
        DataSet data = PoulateStates();
        if (data.Tables.Count > 0 && data.Tables[0].Rows[0][0].ToString() == "0")
        {
            int itemOffset = e.NumberOfItems;
            int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Tables[0].Rows.Count);
            e.EndOfItems = endOffset == data.Tables[0].Rows.Count;
            for (int i = itemOffset; i < endOffset; i++)
            {
                RadComboState.Items.Add(new RadComboBoxItem(data.Tables[0].Rows[i]["State_Name"].ToString(),
                                                            data.Tables[0].Rows[i]["intPkVal"].ToString()));
            }
 
            e.Message = GetStatusMessage(endOffset, data.Tables[0].Rows.Count);
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            if (Session["COUNTRY"] != null && Session["COUNTRY"].ToString().ToUpper() == "MARSHALL ISLANDS")
                item.Text = "No Island Exists";
            else
            item.Text = "No State Exists";
            RadComboState.Items.Add(item);
        }
    }
 
    protected void RadComboInstitution_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboInstitution.Items.Clear();
       // string StateId = e.Context["StateId"].ToString();
        if ((RadComboState.SelectedValue != null && RadComboState.SelectedValue != "-1") || (e.Text.ToString() != "" && e.Text.ToString() != "-1"))
        //if (e.Text.ToString() != "" && e.Text.ToString() !="-1")
        {
            DataSet Institution = populateInstitution(e.Text);
            if (Institution.Tables[0].Rows[0][0].ToString() == "0")
            {
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Institution.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Institution.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboInstitution.Items.Add(
                        new RadComboBoxItem(Institution.Tables[0].Rows[i]["Institution_Name"].ToString(),
                                            Institution.Tables[0].Rows[i]["InstitutionId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Institution.Tables[0].Rows.Count);
            }
            else
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = "-1";
                item.Text = "No Institution Exists";
                RadComboInstitution.Items.Add(item);
            }
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            item.Text = "No Institution Exists";
            RadComboInstitution.Items.Add(item);
        }
    }
 
    protected void RadComboTerm_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboTerm.Items.Clear();
        string s = RadComboInstitution.SelectedValue;
        if ((RadComboInstitution.SelectedValue != null && RadComboInstitution.SelectedValue!="-1") || (e.Text.ToString() != "" && e.Text.ToString() !="-1"))
        {
            DataSet Term = populateTerm(e.Text);
            if (Term.Tables[0].Rows[0][0].ToString() == "0")
            {
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Term.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Term.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboTerm.Items.Add(new RadComboBoxItem(Term.Tables[0].Rows[i]["Term_Name"].ToString(),
                                                               Term.Tables[0].Rows[i]["TermId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Term.Tables[0].Rows.Count);
            }
            else
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = "-1";
                item.Text = "No Term Exists";
                RadComboTerm.Items.Add(item);
            }
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            item.Text = "No Term Exists";
            RadComboTerm.Items.Add(item);
        }
    }
 
    protected void RadComboCourse_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboCourse.Items.Clear();
        if (e.Text.ToString() != " " && e.Text.ToString() != "-1")
        {
            DataSet Course = PopulateCourse(e.Text);
            if (Course.Tables[0].Rows[0][0].ToString() == "0")
            {
                Session["TermId"] = e.Text;
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Course.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Course.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboCourse.Items.Add(new RadComboBoxItem(Course.Tables[0].Rows[i]["Course_Name"].ToString(),
                                                                 Course.Tables[0].Rows[i]["CourseId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Course.Tables[0].Rows.Count);
            }
            else
            {
                RadComboBoxItem comboBoxItem = new RadComboBoxItem();
                comboBoxItem.Value = "-1";
                comboBoxItem.Text = "No Eourse Exists";
                RadComboCourse.Items.Add(comboBoxItem);
            }
        }
        else
        {
            RadComboBoxItem comboBoxItem = new RadComboBoxItem();
            comboBoxItem.Value = "-1";
            comboBoxItem.Text = "No Eourse Exists";
            RadComboCourse.Items.Add(comboBoxItem);
        }
    }
 
    protected void RadComboSection_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboSection.Items.Clear();
        //string TermId = e.Context["TermId"].ToString();
        if (e.Text.ToString() != "" && e.Text.ToString() != "-1")
        {
            DataSet Section = PopulateSection(e.Text);
            if (Section.Tables[0].Rows[0][0].ToString() == "0")
            {
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, Section.Tables[0].Rows.Count);
                e.EndOfItems = endOffset == Section.Tables[0].Rows.Count;
 
                for (int i = itemOffset; i < endOffset; i++)
                {
                    RadComboSection.Items.Add(new RadComboBoxItem(Section.Tables[0].Rows[i]["Section_Name"].ToString(),
                                                                  Section.Tables[0].Rows[i]["intSectionId"].ToString()));
                }
 
                e.Message = GetStatusMessage(endOffset, Section.Tables[0].Rows.Count);
            }
            else
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = "-1";
                item.Text = "No Sectioon Exists";
                RadComboSection.Items.Add(item);
            }
        }
        else
        {
            RadComboBoxItem item = new RadComboBoxItem();
            item.Value = "-1";
            item.Text = "No Sectioon Exists";
            RadComboSection.Items.Add(item);
        }
    }
 
    [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
    public string getCourseDetails(string CourseId)
    {
        string URL=null;
        //if (ConfigurationManager.AppSettings.Get("ECFRETURNPATH") != null)
        //{
            string productId = GetProductID(CourseId);
         //   ecfPath = ConfigurationManager.AppSettings.Get("ECFRETURNPATH").ToString();
            URL = ecfPath + "','" + productId;
       // }
        return URL;
    }
 
    [AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
   public string getSectionDetails(string sectionId)
    {
        string data = "dsfddg";
 
        return data;
    }
 
     
    private void disableControl(string fromModule)
    {
        trInstitutionCombo.Visible = true;
        if (ViewState["CALLEDFROM"] != null && ViewState["CALLEDFROM"].ToString() == "REP") //Inside Repeat
        {
            trInstitutionCombo.Visible = false;
        }
        trTermCombo.Visible = true;
        trSectionCombo.Visible = true;
        trCourseCombo.Visible = true;
 
        trNoData.Visible = true;
        trInstName.Visible = false;
        trTiming.Visible = false;
        trLocation.Visible = false;
        trNext.Visible = false;
        lbnViewCourse.Visible = (RadComboCourse.SelectedValue == "-1") ? false : true;
 
        if (fromModule == "true")
        {
            trNoData.Visible = false;
            trInstName.Visible = true;
            trTiming.Visible = true;
            trLocation.Visible = true;
            trNext.Visible = true;
            btnNext.Visible = true;
        }
        else if (fromModule == "NOSTATE")
        {
            trInstitutionCombo.Visible = false;
            trTermCombo.Visible = false;
            trSectionCombo.Visible = false;
            trCourseCombo.Visible = false;
        }
    }
 
    protected void btnNext_Click(object sender, EventArgs e)
    {       

    }
 
    private void publishError(Exception error)
    {
        DataSet dstError;
        CustomErrorPublisher objError = new CustomErrorPublisher();
        dstError = objError.Publish(error);
        trError.Visible = true;
        lblError.Visible = true; //THE LABEL USED TO DISPLAY THE ERROR MESSAGE
        lblError.Text = dstError.Tables[0].Rows[0][2].ToString();
        trError.Visible = true;
        objError = null;
        dstError = null;
    }
}
Dimitar Terziev
Telerik team
 answered on 12 Jun 2012
1 answer
99 views
I am using RadComboBox in Usercontrol. When I clicked on the RadComboBox the dropdownlist not displaying in the correct position on IE. But it works fine in chrome.


Telerik Version : 2011.2.915.35
.NET Framework     : 3.5



use control code :


 <div class="panel" style="z-index: 99999;" id="QuestionFBPanel">
        <uc2:FeedbackUserControl ID="FeedbackUserControl1" runat="server" SettingDefault="true"
            FeedbackType="2" TotalFeedbackItem="1" />       
    </div>

Notes : RadComboBox  added inside the FeedbackUserControl1

FeedbackSlideout.css

panel 
{
position: fixed;
top: 50px;
right: 50px;
display: none;
border:1px solid #111111;    
z-index:10;
    
}
.panel p
{
margin: 0 0 15px 0;
padding: 0;


}

Ivana
Telerik team
 answered on 12 Jun 2012
6 answers
91 views
I cannot reply to any posts in the grid forum.  I get that stupid annoying "Oops!" error.  Please fix this - I have issues to resolve.

Funniest thing is I can post new threads all day long.....

aaarrrrggg!!!!
Dimo Mitev
Telerik team
 answered on 12 Jun 2012
1 answer
62 views
I am trying to get the appointments to display and i am able to get the appointment control up but then inside of the appointment there is no text at all it is just blank. Although it will display a tool tip that has what the subject of it should be. Another note is that i am using a custom advanced insert template is that y it is doing this? Please help!
Plamen
Telerik team
 answered on 12 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?