Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
251 views
I have a radlistbox and the items are being inserted programmatically, how do I expand the width of an item so multiple items won't show on a single line as they are showing as of now.

currently items are being inserted to listbox in c# like :
rlbAssigned.Items.Add(new RadListBoxItem(rlbAvailable.Items[rlbAvailable.SelectedIndex].Text, rlbAvailable.Items[rlbAvailable.SelectedIndex].Value));

and the listbox is declared as:
<telerik:RadListBox ID="rlbAvailable" runat="server" Height="320px" Width="200px">                                         </telerik:RadListBox>
Farooq
Top achievements
Rank 1
 answered on 07 Nov 2012
2 answers
165 views
I am trying to give a custom color to the radmenu.
Radmenu is as below
<div class="qsf-demo-canvas" align="center">
        <telerik:RadMenu runat="server" ID="RadMenu1" EnableRoundedCorners
="true" OnItemClick="RadMenu1_ItemClick"
            EnableShadows="true" Width="100%">
            <Items>
  </Items>
        </telerik:RadMenu>

The stylesheet is as below:
.qsf-demo-canvas {
    width: 100%
     margin-top:100px;
    position:static;
}
 
.qsf-demo-canvas .RadMenu_Default .rmLink{
     color:White !important;
     background-color:#0099FF !important;
}
.qsf-demo-canvas .RadMenu_Default .rmRootGroup .MyItem {
    float: none;
    background-color:#0099FF !important;
     text-align:left;
}
I have 2 menu items in my radmenu.The color I give in the stylesheet applies only for the length of radmenu 
item,not till the full length of radmenu.
How can I have the custom color for the whole length of radmenu?
Soumya
Top achievements
Rank 1
 answered on 07 Nov 2012
2 answers
113 views
Is this behavoir a known bug, or is there something wrong with my implementation?

My implementation of RadComboBox locks like following:

<tc:RadComboBox ID="_radComboBox" runat="server"
                                Width="250px"
                                Height="250px"
                                CssClass="stringBox"
                                AutoPostBack="true"
                                MarkFirstMatch="true"
                                EnableLoadOnDemand="true"
                                HighlightTemplatedItems="true"
                                EnableVirtualScrolling="true"
                                ShowMoreResultsBox="true"
                                ShowWhileLoading="true"
                                LoadingMessage="Loading..."
                                ShowDropDownOnTextboxClick="true"
                                OnSelectedIndexChanged="OnSelectedIndexChanged"                              
                                OnItemDataBound="OnItemDataBound"
                                OnItemsRequested="OnItemsRequested"
                                OnLoad="OnComboBoxLoad">

I requestet the data in the MethodCall "OnItemsRequested".

If user clicks in the Textbox an empty ListBox is rendering and in background the "OnItemsRequested" method get called.
When this method returns values, they are shown as normal in the listbox.
Now, if the user should request more then the first items (per Default every call of OnItemsRequested returns 10 Items), the "Loading..." string is shown above the List. 
This is what i expected the listBox should do for the first call on DropDownTextboxClicked.

It is a problem, when the "OnItemsRequested" method needs some time for response.
For the user it looks like, there a no items in list.
 (Because of blank list)

Is there something wrong with my implementation, or is this a known bug of RadComboBox?

Im using Telerik.Web.UI.dll in Version 2012.1.215.40.
Nencho
Telerik team
 answered on 07 Nov 2012
1 answer
49 views
I'm using a Radgrid with custom filtering. It all works fine. I also want to use the inherent filtering that comes with the Radgrid. I use the NeedDataSource when getting the results for my custom search logic and code. However, when the "regular" grid filtering is used, the results are okay, but the total items are based off my back end custom code which is wrong. Hope that made sense.

For example....

Custom Filtering - A datatable is obtained containing the results in the NeedDataSource(). The Grids VirtualItemCount is set to the Datatable.rows.count. So now I have a grid with lets say 25 total records ( 15 rows per page).

Non Custom Filtering - The user enters their search text via the Grids filtering textbox, clicks on the button. The NeedDataSource event is fired. The same original custom filtering is supplied to the backend. A datatable is returned just like before with the same results. And the Grids VirtualItemCount is again set to the total number of records like before. However, the Non Custom Filtering is applied ( I have no idea where..it's a mystery to me) and the correct results are displayed. For example purposes, lets say only three records are displayed based from what the user entered in the Grids filtering search textbox. But the total records are still being applied from the Datatable. So it's wrong.

I hope that made sense.  Bottom line, how in the world do you use both those types of filtering together?
Jeff
Top achievements
Rank 1
Veteran
 answered on 07 Nov 2012
1 answer
51 views
Hi All,

In my application, I want to load huge data into the telerik rad grid. In that is it possible to load grid page by page. Means only on page index changed that page data should load in grid. And one more thing is I want to hit database only once. Thanks in advance.

Regards,
Akki
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Nov 2012
2 answers
148 views
I am having issues setting the event handler for the itemcreated and itemdatabound events.  I get a compile error of  'trvAssignedTo_ItemCreated' is not a member of the project.  But the onNeedDataSource works fine.

<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
        <telerik:RadTreeList ID="trvAssignedTo" runat="server" ParentDataKeyNames="ParentID" DataKeyNames="CampusID" OnItemCreated="trvAssignedTo_ItemCreated" OnItemDataBound="trvAssignedTo_ItemDataBound" onNeedDataSource="trvAssignedTo_NeedDataSource" AutoGenerateColumns="false" NoRecordsText="Not Subscribed to Groups">
            <Columns>
                <telerik:TreeListBoundColumn DataField="CampusName" UniqueName="Campus" HeaderText="Campus" />
                <telerik:TreeListBoundColumn DataField="Department" UniqueName="Department" HeaderText="Department" />
                <telerik:TreeListBoundColumn DataField="Description" UniqueName="Group" HeaderText="Group" />
            </Columns>
        </telerik:RadTreeList>
    </div>
    </form>
</body>
 
    Private Sub trvAssignedTo_ItemCreated(sender As Object, e As TreeListItemCreatedEventArgs)
        If TypeOf e.Item Is TreeListHeaderItem Then
            If csSession.sessionCompanyType = "L" Then
                Dim item As TreeListHeaderItem = TryCast(e.Item, TreeListHeaderItem)
                item("Campus").Text = "League"
                item("Department").Text = "Division"
                item("Group").Text = "Team"
            End If
        End If
    End Sub
    Private Sub trvAssignedTo_ItemDataBound(sender As Object, e As TreeListItemDataBoundEventArgs)
        If TypeOf e.Item Is TreeListDataItem Then
            Dim item As TreeListDataItem = TryCast(e.Item, TreeListDataItem)
            If Not DataBinder.Eval(item.DataItem, "ParentID") Is System.DBNull.Value Then
                item("Campus").Font.Italic = True
            End If
        End If
    End Sub
    Protected Sub trvAssignedTo_NeedDataSource(ByVal source As Object, ByVal e As TreeListNeedDataSourceEventArgs)
        Dim dt As DataTable = csSubscribers.getSubscriberGroups(2)
        trvAssignedTo.DataSource = dt
    End Sub
Tina
Top achievements
Rank 2
 answered on 07 Nov 2012
7 answers
98 views
Actually nothing on the Grid works.  It pulls the data from the datasource but nothing else.
I posted this in General Discussion, but I probably should have put it here first.  I didn't see this area before.

RadGrid won't go into Edit mode -

I just installed RadControls for ASP.NET AJAX on my Windows XP 32bit development PC with VS 2010.

I opened a newly created website which had only a single GridView already on it and I selected Convert to Telerik web site from the Telerik menu that is now in VS.

The first thing I noticed was that the GridView no longer worked. Clicking on Select or Edit no longer do anything. So I dragged a RadGrid to the form, left all the default settings and selected the same DataSource the original GridView is using. Now with the original GridView and the new RadGrid on the page, both grids display the same rows of data as one would expect.

I enabled AllowAutomaticDeletes, AllowAutomaticInserts, and AllowAutomaticUpdates and set AutoGenerateEditColumn to True.

The original GridView still does not work. Click "Select" and the row is not selected. Click "Edit" and it does not go into Edit mode.
The new RadGrid also does not work. There is an "Edit" link. Clicking it does nothing. The page flickers like there was a postback or something, but the row does not go into edit mode.

I started with the standard ToolkitScriptManager and then changed it to the RadScriptManager. Neither worked.

What am I missing?
Pam
Top achievements
Rank 2
 answered on 07 Nov 2012
9 answers
154 views
Hello!

In the RadGrid, I use image columns a lot, but there seems to be a problem when combining with OnRowClick.
When clicking on the image, no row click happens!

Simplified sample:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1" %>
 
<!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>
    <script runat="server">
        Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim dt As New System.Data.DataTable()
            dt.Columns.Add("Col1", GetType(String))
            dt.Rows.Add({"Row1"})
            aaa.DataSource = dt
            aaa.DataBind()
        End Sub
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ccc" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadGrid ID="aaa" runat="server">
            <ClientSettings>
                <ClientEvents OnRowClick="function(){alert('Clicked');}" />
            </ClientSettings>
            <MasterTableView>
                <Columns>
                    <telerik:GridImageColumn ImageUrl="go.gif">
                    </telerik:GridImageColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>


Regards
Rikard
Farooq
Top achievements
Rank 1
 answered on 07 Nov 2012
1 answer
109 views
I have rad panel bar at the left side of the page.I want to load a rad tab on the right side of the page.The idea is to generate multiple tabs dynamically on the same page.Please note I have divided the page using a radsplitter. Lets say i have the following items at the panel bar:

Item1
Item2
Item3

The right side page is called home.aspx.Now clicking Item1 will open radtab1 on home.aspx and without reloading home.aspx if I click Item2 another new tab(radtab2) will open beside radtab1.Any idea how I can achieve this?Thanks in advance. 

Here's the code of the page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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">
 
<head runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            background: #fff;
            height: 100%;
            margin: 0;
            padding: 0;
            width: 100%;
            position: absolute;
        }
    </style>
    <link href="Styles/Default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="page">
       <div class="header01">
            <div class="head_top">
                <div class="homeicon">
                    <asp:HyperLink runat="server" Target="_parent" NavigateUrl="~/Default.aspx">
                        <asp:Image ID="Homeicon" runat="server" ImageUrl="~/Images/home.png"/>
                    </asp:HyperLink>  
                </div>
                <div class="side01">
                    <label class="text02">XERP</label>
                </div>
                <div class="side02">
                    <telerik:RadMenu runat="server" Skin="">
                        <Items>
                            <telerik:RadMenuItem CssClass="dropdowntop">
                                <ItemTemplate>                                     
                                <div class="dropdownside01">
                                    <label class="text01">Hi! Rezwanul Huq</label>
                                    <label class="text01">Wed 15, Oct 2012 15:12</label>                  
                                </div>
                                <div class="dropdownside02">
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Icons/client.png"/>
                                </div>
                                </ItemTemplate>
                                <Items>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/message.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Inbox</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/chpassword.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Change Password</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/Settings.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Settings</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/help.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Help</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/Logout.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Log Out</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>                              
                                            <div class="DropdownText01">
                                               <asp:Label ID="Label1" runat="server" class="text03">Last Login Detail: <br /> Wed 15, Oct 2012 15:12</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>
               </div>             
            </div>
       </div>
       <div class="bottom">
            <telerik:RadSplitter ID="RadSplitter1" Width="99.9%" Height="100%" runat="server"
                ResizeMode="EndPane">
                <telerik:RadPane ID="RadPane1" runat="server" Width="18.8%" CssClass="menu" Scrolling="Y">
                    <div style="height:3%; margin:3px 1px 0px 3px;">
                        <telerik:RadTextBox  EmptyMessage="Search Menu...." ID="searchbox" runat="server" Width="178px">
                             
                        </telerik:RadTextBox>
                        <telerik:RadButton ID="searchbtn" runat="server" Skin="" CssClass="SearchButton" >
                            <Icon PrimaryIconWidth="26px" PrimaryIconHeight="26px" PrimaryIconUrl="Images/Icons/search.png" />
                        </telerik:RadButton>
                    </div>
                    <telerik:RadPanelBar ID="RadPanelBarMenu" runat="server" ExpandMode="FullExpandedItem"
                        Height="96%"  Width="100%">
                        <Items>
                            <telerik:RadPanelItem runat="server" Expanded="true" Height="30px" Text="Business Settings" ImageUrl="~/Images/Icons/business_settings.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettings/CompanySetup.aspx"
                                        Target="MainPane" Text="Company Setup">
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/BusinessSettings/BankSetup.aspx"
                                        Target="MainPane" Text="Bank">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Human Resource" ImageUrl="~/Images/Icons/HRM_icon.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/HRM/Employee.aspx"
                                        Target="MainPane" Text="Employee">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Stock & Inventory" ImageUrl="~/Images/Icons/SI.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/SI/Items.aspx"
                                        Target="MainPane" Text="Items">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Security" ImageUrl="~/Images/Icons/security.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/Security/SecurityUsers.aspx"
                                        Target="MainPane" Text="User">
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/Account/ChangePassword.aspx"
                                        Target="MainPane" Text="Change Password">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
                <telerik:RadPane runat="server" ID="MainPane" ContentUrl="UserHome.aspx">
                </telerik:RadPane>
            </telerik:RadSplitter>
            </div>
 
 
    </div>
    </form>
</body>
</html>
Kate
Telerik team
 answered on 07 Nov 2012
2 answers
212 views
We have had problems with RadMaskedTextBox showing the EmptyMessage since upgrading to 2012 Q2.  Previously this was not a probhlem.  The following markup just shows the expected input rather than the empty message.

<telerik:RadMaskedTextBox ID="SSNTextBox" runat="server" EmptyMessage="SSN" Mask="###-##-####" />

See the attached screenshot.
Tom Rasmussen
Top achievements
Rank 1
 answered on 07 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?