Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
Hello,

As per the client requirement i will be having 2 combo box on my screen 1 combobox will be single column and other will be multicolumn. first Combo box will get populated on page load and second will get populated as per the value selected in First combo box. please let me know how can i do this, i want to populate both the combobox on server side.

i have done one example but when i am trying to get the selected value from first combo i am getting blank values. please let me know that how can i get the selected value of single column rad combo and multicolumn rad combo.

bellow  is my code.
ASPX page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
    <table>
    <tr>
    <td>
    <telerik:RadComboBox ID="RADClasification"  EnableLoadOnDemand="True" 
            Runat="server" onitemsrequested="RADClasification_ItemsRequested" 
            onselectedindexchanged="RADClasification_SelectedIndexChanged" 
            onitemdatabound="RADClasification_ItemDataBound">
        </telerik:RadComboBox>
    </td>
    </tr>
    <tr>
        <td>
         <telerik:RadComboBox ID="RadTemplateGroup" Runat="server"  
                EnableLoadOnDemand="True" onitemsrequested="RadTemplateGroup_ItemsRequested">
            <HeaderTemplate
                    <ul
                         <li>Template Group name</li
                         <li>Effective Date</li>
                    </ul
               </HeaderTemplate
               <ItemTemplate
                    <ul
                         <li
                              <%# DataBinder.Eval(Container.DataItem, "Template_GroupName")%></li
                         <li
                              <%# DataBinder.Eval(Container.DataItem, "EffectiveDate")%></li
                           
                    </ul
               </ItemTemplate
               <FooterTemplate
                    A total of 
                    <asp:literal runat="server" id="RadComboItemsCount" /> 
                    items 
               </FooterTemplate
  
        </telerik:RadComboBox>
        </td>
    </tr>
  
    </table>
         
  
         
  
    </div>
    </form>
</body>
</html>
ASPX.CS
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
  
public partial class Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
    protected void RADClasification_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        RADClasification.DataSource = CreateDatatable();
        RADClasification.DataValueField = "Cat_ID";
        RADClasification.DataTextField = "Description";
        RADClasification.DataBind();
  
    }
    private DataTable CreateDatatable()
    {
  
        DataTable dt = new DataTable();
        dt.Columns.Add("Cat_ID", typeof(int));
        dt.Columns.Add("Description", typeof(string));
  
        for (int i = 1; i <= 10; i++)
        {
            dt.Rows.Add(i, "Catagory" + i.ToString());
        }
        return dt;
    }
    private DataTable PopulateTemplateGroup()
    {
        DataTable Dt = new DataTable();
        Dt.Columns.Add("Template_Group_ID",typeof(int));
        Dt.Columns.Add("Template_GroupName",typeof(string));
        Dt.Columns.Add("EffectiveDate",typeof(string));
  
        if (Convert.ToInt32(RADClasification.SelectedValue) > 4)
        {
            Dt.Rows.Add(1, "TG1", "10-May-2013");
            Dt.Rows.Add(2, "TG2", "10-May-2013");
            Dt.Rows.Add(3, "TG3", "10-May-2013");
  
        }
        else
        {
            Dt.Rows.Add(4, "TG4", "20-May-2013");
            Dt.Rows.Add(5, "TG5", "20-May-2013");
            Dt.Rows.Add(6, "TG6", "20-May-2013");
        }
        return Dt;
    }
    protected void RADClasification_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
         
    }
    protected void RadTemplateGroup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {
        RadTemplateGroup.DataSource = PopulateTemplateGroup();
        
        RadTemplateGroup.DataBind();
  
    }
    protected void RADClasification_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
    {
        e.Item.Text = ((DataRowView)e.Item.DataItem)["Description"].ToString();
        e.Item.Value = ((DataRowView)e.Item.DataItem)["Cat_ID"].ToString();   
  
    }
}

Plamen
Telerik team
 answered on 14 Jun 2013
1 answer
88 views
i am using tooltip manager on rad calendar as described in
 http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx?#

Now the Problem tool tip closes after a few seconds (before it can fetch the data to show)

i have tried increasing tool tip time out but that didn't work

(it is a part of java script function provided by Telerik in the demo)
setTimeout(function () {
                              tooltip.show();
                         }, 10000);

another problem is that i want to change the size of the toop tip, i am using a repeater that can hold multiple data to show in the toop tip.
Viktor Tachev
Telerik team
 answered on 14 Jun 2013
1 answer
51 views
Good day,

There is an issue when we're trying to build RadHtmlChart in IE8 having rotated labels (of xAxis or yAxix).
Font of labels is Italic in this case and there is no posibility to fix it by changing the font family, size or text decoration.
To see the issue open your demo page 
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/charttypes/columnchart/defaultcs.aspx
in ie8 mode (see attached)

Could you please provide any solution to sort this out?

Best regards,
Danail Vasilev
Telerik team
 answered on 14 Jun 2013
3 answers
658 views
I need the tablelayout to be Auto but no matter what I try is will not. Here is what I did. Any help would be great.
<telerik:RadGrid ID="RadGrid2" runat="server" GridLines="None"
                            AllowPaging="false" AllowSorting="false" AutoGenerateColumns="false" OnItemCommand="RadGrid2_ItemCommand"
                            ShowStatusBar="false"
                            AllowAutomaticUpdates="True">
                            <MasterTableView DataKeyNames="TeacherNumber,Teacher,LastName,FormerLastName,FirstName,Username,Password,Email,FileFolder,TeacherID,SortPriority,Active" TableLayout="Auto" Width="100%" CommandItemDisplay="None">
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="PushButton" UniqueName="EditCommandColumn">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridBoundColumn UniqueName="TeacherNumber" EditFormColumnIndex="0" HeaderText="#" DataField="TeacherNumber">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Teacher" EditFormColumnIndex="0" HeaderText="Display Name" DataField="Teacher">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridDateTimeColumn UniqueName="LastName" EditFormColumnIndex="0" HeaderText="Last" DataField="LastName">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridDateTimeColumn>
                                    <telerik:GridBoundColumn UniqueName="FormerLastName" EditFormColumnIndex="0" HeaderText="Former Last" DataField="FormerLastName">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="FirstName" EditFormColumnIndex="0" HeaderText="First" DataField="FirstName">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Username" EditFormColumnIndex="0" HeaderText="Username" DataField="Username">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Password" HeaderText="Password" DataField="Password">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Email" HeaderText="Email" DataField="Email">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="FileFolder" HeaderText="File Folder Number" DataField="FileFolder">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="TeacherID" HeaderText="Teacher ID" DataField="TeacherID">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="SortPriority" HeaderText="Sort Priority" DataField="SortPriority">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Active" HeaderText="Active" DataField="Active">
                                        <HeaderStyle ForeColor="Black" Font-Bold="true"></HeaderStyle>
                                    </telerik:GridBoundColumn>
                                </Columns>
</MasterTableView>
                            <ClientSettings>
                                <Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
                                <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
                            </ClientSettings>
                        </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 14 Jun 2013
1 answer
60 views
All <object> tags are removed when you open Rad Editor in IE in Quirks document mode.
Reproducing scenario:
1. Open Rad Editor in IE9 and set Quirks document mode(by using F12 Developers tools)
2. Insert the following html to the Html tag
<object id="111" class="class">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="458" />
<param name="height" value="388" />
<param name="playerID" value="11111" />
<param name="playerKey" value="xxxxxxxxx" />
<param name="isVid" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="@videoPlayer" value="1111111" />
</object>

3. Open Design and back to the Html tab

Result: the <object> tag is gone.
Note it reproduces only in IE in the Quirks mode.
How can we fix it?
Ivaylo
Telerik team
 answered on 14 Jun 2013
1 answer
152 views
PageSizeControlType for the tag pagerStyle is not working for my RadGrid. I am using telerik of year 2012. Can you please tell me whether this feature is available for my Telerik dll
<PagerStyle PageSizeControlType="RadComboBox" />
Shinu
Top achievements
Rank 2
 answered on 14 Jun 2013
2 answers
32 views
I'm brand new to using Telerik AJAX controls.  I updated today to Q2'13, my first upgrade.

After the installation, I ran the Upgrade Wizard on my project and got all Greens.

But now all of my pages show:

Parser Error Message: Could not load file or assembly 'Telerik.OpenAccess, Version=2013.1.219.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.


I'm sure there is something really simple that I am missing.  I had assumed it would update my references.

Is this normal behavior or am I missing something?  I find it hard to believe I have to update all the assembly references in my whole project.

Thanks for any help,
Newby
Biliana Ficheva
Telerik team
 answered on 14 Jun 2013
1 answer
94 views
Hi
I use local copies of your std skin files so I can make subtle changes.

I have just installed the latest release, and all my button controls have lost their CSS styling - see image.

What has changed?

Andy
Bozhidar
Telerik team
 answered on 14 Jun 2013
5 answers
140 views
i have a radpanelbar that contains a radgrid. i have turned on allowpaging but not sure how to make the paging works. every time when i click on page 2 or next page or any page, my grid disappear. so i put in OnNeedDataSource but it only refreshes my grid and not going to the right page. any idea how to do this? thank you
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource">
<MasterTableView DataKeyNames="id" AutoGenerateColumns="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                                AlternatingItemStyle-HorizontalAlign="Center" >
                                                <Columns>
 <telerik:GridBoundColumn DataField="id" HeaderText="id" UniqueName="id" ReadOnly="true" />
</Columns>
                                            </MasterTableView>
                                            <PagerStyle Mode="NextPrevAndNumeric" />
                                        </telerik:RadGrid>




Princy
Top achievements
Rank 2
 answered on 14 Jun 2013
13 answers
519 views
HI,

I am building one radgrid with dynamic column creation. i.e I am binding dynamic columns in code behind file. I have declared grid as follows.

<

telerik:RadGrid ID="radgrdClaimsAvailable" runat="server" Skin="Office2007" GridLines="None" AllowPaging="true" PageSize="10" AutoGenerateColumns="true">

 

 

<HeaderStyle BackColor="#E3EAF1"></HeaderStyle>

 

 

<ClientSettings EnablePostBackOnRowClick="true">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

</ClientSettings>

 

 

<MasterTableView PagerStyle-AlwaysVisible="true" PagerStyle-Mode="NextPrevNumericAndAdvanced" AllowPaging="true" AllowSorting="true">

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 


Now I want hide one column. How can I achieve this through code behind. When I put following line of code in Grid PreRender, ColumnCreated, Page Prerender Completed event events it is throughing exception like:

Code:

If

radgrdClaimsAvailable.Columns.Count > 2 Then

 

radgrdClaimsAvailable.Columns(1).Display =

False

 

radgrdClaimsAvailable.Columns(2).Display =

False

 

 

End If

 



Exception:

Failed accessing GridColumn by index. Please verify that you have specified the structure of RadGrid correctly.

Please Help me in Hiding the columns in CodeBehind for RadGrid.

Thanks in Advance,
Medac
Purojit
Top achievements
Rank 1
 answered on 14 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?