Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
120 views
I have a RadRotator in a floating RadDock.  The rotator's height is greater than the RadDock and the scroll bar is turned on.  The elements inside of the rotator show beyond the RadDock and if you scroll the RadDock the contents of the rotator sometimes do not scroll with the scroll bar and sometimes they do but it is hugely delayed.  It takes 10-20 seconds or more for the RadRotator contents to scroll (when they do).

Attached is a picture of the results.
Doug
Top achievements
Rank 1
 answered on 20 Jan 2010
3 answers
123 views
Hi folks,

is there some way to assign class to anchor html tag to get styled as automaticaly styled asp:Button with form decorator?


Thanks for reply!
Georgi Tunev
Telerik team
 answered on 20 Jan 2010
3 answers
187 views
HI

i am trying to get the selectedvalue of a dropdownlist in a nestedviewtemplate? what could be wrong?

reg

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
</head> 
<body class="BODY"> 
    <form runat="server" id="mainForm" method="post"> 
    <telerik:RadScriptManager runat="server" ID="ScriptManager1"> 
    </telerik:RadScriptManager> 
    <!-- content start --> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" 
        AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="True" PageSize="5" 
        GridLines="None" ShowGroupPanel="true"> 
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="EmployeeID" AllowMultiColumnSorting="True"> 
            <NestedViewTemplate> 
                <telerik:RadGrid runat="server" ID="nestedgrid" ShowFooter="true" AllowSorting="true" 
                    EnableLinqExpressions="false"> 
                    <MasterTableView ShowHeader="true" AutoGenerateColumns="true" AllowPaging="true" 
                        PageSize="7"> 
                        <Columns> 
                            <telerik:GridEditCommandColumn> 
                            </telerik:GridEditCommandColumn> 
                        </Columns> 
                        <EditFormSettings EditFormType="Template"> 
                            <FormTemplate> 
                                                                
                                <asp:ImageButton ID=imgb runat=server CommandName="go"  /> 
                                <asp:DropDownList id=ddl1  runat=server></asp:DropDownList> 
                            </FormTemplate> 
                        </EditFormSettings> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </NestedViewTemplate> 
            <Columns> 
                <telerik:GridBoundColumn SortExpression="FirstName" HeaderText="First Name" HeaderButtonType="TextButton" 
                    DataField="FirstName" UniqueName="FirstName"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="LastName" HeaderText="Last Name" HeaderButtonType="TextButton" 
                    DataField="LastName" UniqueName="LastName"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton" 
                    DataField="Title" UniqueName="Title"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="BirthDate" DataFormatString="{0:MM/dd/yyyy}" 
                    HeaderText="Birth Date" HeaderButtonType="TextButton" DataField="BirthDate" UniqueName="BirthDate"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="City" HeaderText="City" HeaderButtonType="TextButton" 
                    DataField="City" UniqueName="City"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="Country" HeaderText="Country" HeaderButtonType="TextButton" 
                    DataField="Country" UniqueName="Country"> 
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings AllowDragToGroup="true" /> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Employees" 
        runat="server"></asp:SqlDataSource> 
    <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
        ProviderName="System.Data.SqlClient" runat="server"></asp:SqlDataSource> 
    <!-- content end --> 
    </form> 
</body> 
 
Imports Telerik.Web.UI 
Imports System 
Imports System.Data 
Imports System.Data.SqlClient 
Imports System.Web.UI.WebControls 
Imports System.Configuration 
Partial Class _Default 
    Inherits System.Web.UI.Page 
 
 
    Dim ConnString As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString 
 
    Protected Sub nestedgrid_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) 
        Dim btn As Button 
        Dim ddl As DropDownList 
        If e.Item.ItemType = GridItemType.EditFormItem And e.Item.IsInEditMode Then 
            Dim edititem As GridEditFormItem = CType(e.Item, GridEditFormItem) 
            ddl = CType(edititem.FindControl("ddl1"), DropDownList) 
            btn = CType(edititem.FindControl("btngo"), Button) 
 
            ddl.DataSource = dsddl() 
            ddl.DataTextField = "ShipName" 
            ddl.DataValueField = "OrderID" 
            ddl.DataBind() 
 
        End If 
    End Sub 
 
    Protected Sub nestedgrid_itemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) 
 
         
        If e.CommandName = RadGrid.UpdateCommandName Then 
            If e.Item.ItemType = GridItemType.EditFormItem Then 
                Dim nestedview As GridNestedViewItem = CType((CType(e.Item, GridEditFormInsertItem)).OwnerTableView.Parent.NamingContainer, GridNestedViewItem) 
                Dim ddl1 As DropDownList = CType(nestedview.FindControl("ddl1"), DropDownList) 
                'i would like to assign to get the selected value of the ddl1  !! 
                'Dim result = ddl1.SelectedValue 
            End If 
        End If 
 
 
    End Sub 
 
 
 
    Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemCreated 
 
        If TypeOf e.Item Is GridNestedViewItem Then 
            Dim rg As RadGrid = e.Item.FindControl("NestedGrid") 
            Dim imgb As ImageButton = rg.MasterTableView.FindControl("imgb") 
            AddHandler rg.ItemCreated, AddressOf nestedgrid_ItemCreated 
            AddHandler rg.ItemCommand, AddressOf nestedgrid_itemCommand 
            AddHandler rg.UpdateCommand, AddressOf nestedgrid_UpdateCommand 
            rg.DataSource = myds() 
            rg.DataBind() 
        End If 
 
    End Sub 
 
    Protected Sub nestedgrid_UpdateCommand() 
 
    End Sub 
 
    Public Function myds() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName, ShipAddress FROM Orders", conn) 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
            adapter.Fill(myDataSet, "Orders") 
            adapter.SelectCommand = New SqlCommand("SELECT OrderID, Quantity FROM [Order Details]", conn) 
            adapter.Fill(myDataSet, "OrderDetails") 
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
 
    Public Function dsddl() As DataSet 
        Dim conn As SqlConnection = New SqlConnection(ConnString) 
        Dim adapter As SqlDataAdapter = New SqlDataAdapter 
        Dim myDataSet As DataSet = New DataSet 
 
        conn.Open() 
        Try 
 
            adapter.SelectCommand = New SqlCommand("SELECT TOP 10 OrderID, ShipName FROM Orders", conn) 
            adapter.Fill(myDataSet, "OrderDetails") 
        Finally 
            conn.Close() 
        End Try 
        Return myDataSet 
 
    End Function 
 
End Class 
 

Pavlina
Telerik team
 answered on 20 Jan 2010
2 answers
168 views
I have a grid with the ability to add and update items via the standard controls.

However, if I click to add a record and then click on "edit" on another record then both forms will be displayed at the same time. Is there any method of preventing this behavior to ensure that only one form or the other is displayed?

TIA,

  Jason

Jason Thacker
Top achievements
Rank 1
 answered on 20 Jan 2010
1 answer
141 views
There appears to be some image corruption on RadComboBoxes used within a ListView EditItemTemplate or InsertItemTemplate (see attached image)

The following markup is generated by creating a new rad-website, dropping a RadListView control onto the page, and configuring it in the designer-helper.


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="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"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadListView1"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadListView1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Outlook"> 
    </telerik:RadSkinManager> 
    <div> 
        <telerik:RadListView ID="RadListView1" runat="server" InsertItemPosition="LastItem" 
            Skin="Outlook" OnNeedDataSource="RadListView1_NeedDataSource"> 
            <EditItemTemplate> 
                <tr class="rlvIEdit"> 
                    <td> 
                        <table cellspacing="0" class="rlvEditTable"> 
                            <tr> 
                                <td colspan="2"> 
                                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" CssClass="rlvBUpdate" 
                                        Text=" " /> 
                                    <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" 
                                        CssClass="rlvBCancel" Text=" " /> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                    <td> 
                        <telerik:RadComboBox ID="dimensionAliasComboBox" runat="server" Width="100px" EmptyMessage="Choose Dimension Alias" 
                            Skin="Outlook"> 
                            <Items> 
                                <telerik:RadComboBoxItem Text="to populate" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                    </td> 
                    <td> 
                        <telerik:RadComboBox ID="RadComboBox4" runat="server" Width="100px" EmptyMessage="Choose Dimension Level" 
                            Skin="Outlook"> 
                            <Items> 
                                <telerik:RadComboBoxItem Text="to populate" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
            </EditItemTemplate> 
            <InsertItemTemplate> 
                <tr class="rlvIEdit"> 
                    <td> 
                        <table cellspacing="0" class="rlvEditTable"> 
                            <tr> 
                                <td colspan="2"> 
                                    <asp:Button ID="PerformInsertButton" runat="server" CommandName="PerformInsert" CssClass="rlvBAdd" 
                                        Text=" " /> 
                                    <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" 
                                        CssClass="rlvBCancel" Text=" " /> 
                                </td> 
                            </tr> 
                        </table> 
                    </td> 
                </tr> 
            </InsertItemTemplate> 
            <ItemTemplate> 
                <tr class="rlvI"> 
                    <td> 
                        <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" CssClass="rlvBDel" 
                            Text=" " /> 
                        <asp:Button ID="EditButton" runat="server" CommandName="Edit" CssClass="rlvBEdit" 
                            Text=" " /> 
                    </td> 
                    <td> 
                        dfsdfds 
                    </td> 
                    <td> 
                        sfsdfds 
                    </td> 
                </tr> 
            </ItemTemplate> 
            <EmptyDataTemplate> 
                <div class="RadListView RadListView_Outlook"> 
                    <div class="rlvEmpty"> 
                        There are no items to be displayed.</div> 
                </div> 
            </EmptyDataTemplate> 
            <LayoutTemplate> 
                <div class="RadListView RadListView_Outlook"> 
                    <table cellspacing="0" style="width: 100%;"> 
                        <thead> 
                            <tr class="rlvHeader"> 
                                <th> 
                                    &nbsp; 
                                </th> 
                                <th> 
                                    Column1 
                                </th> 
                                <th> 
                                    Column2 
                                </th> 
                            </tr> 
                        </thead> 
                        <tbody> 
                            <tr id="itemPlaceholder" runat="server"> 
                            </tr> 
                        </tbody> 
                    </table> 
                </div> 
            </LayoutTemplate> 
            <SelectedItemTemplate> 
                <tr class="rlvISel"> 
                    <td> 
                        <asp:Button ID="DeselectButton" runat="server" CommandName="Deselect" CssClass="rlvBSel" 
                            Text=" " /> 
                        <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" CssClass="rlvBDel" 
                            Text=" " /> 
                        <asp:Button ID="EditButton" runat="server" CommandName="Edit" CssClass="rlvBEdit" 
                            Text=" " /> 
                    </td> 
                </tr> 
            </SelectedItemTemplate> 
        </telerik:RadListView> 
    </div> 
    </form> 
</body> 
</html> 
 

thankyou
Dimo
Telerik team
 answered on 20 Jan 2010
2 answers
146 views
I have a grid, with a edit item template.
It has a button, on click of which i want to populate a list box (while the user is in the edit mode of the row).
However, i cant get that control using the find control on that row.
When I change the command name to "Update", I can get the same in ((GridEditableItem)e.Item).FindControl("lbCatDesc"). The problem using the CommandName as "Update" is that it closes the edit view. However i want the user to be able to continue to edit
Sabyasachi Dechaudhari
Top achievements
Rank 1
 answered on 20 Jan 2010
1 answer
77 views
Hello,
After moving a web application from Windows Server 2003 and IIS6 to Windows Server 2008 Web Edition and IIS7, (Classic mode), the controls appears when the aspx page is loaded but they don' t fully work. For example, I have an horizontal menu, I can navigate when I click on an item which redirect to a new page, but when I click an item which is aimed to display a submenu... it does not work. 
Rotator, TabStrip does not work either.... 
I have no error message. The page is loaded, but controls don' t work. The same application worked fine in IIS6.
Any help would be greatly appreciated.... Thanks
Dimo
Telerik team
 answered on 20 Jan 2010
6 answers
320 views
I have a RadTreeview with a RadTreeViewContextMenu.  The RadTreeViewContextMenu should be the same thing as a RadContextMenu correct?

So I'm trying to do two things here.
1) Display the context menu using the keyboard.  Preferably [Shift] + [F10].
2) Set Focus on the context menu when it displays, so I can navigate through it with the keyboard.

I've attempted at setting focus to the menu first and it just would not work for me.  Giving the focus to the menu in the event OnClientContextMenuShown, gets me this javascript error saying "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus."  I've tried setting the menu to display, setting it to enabled, and none of those work, so is this menu of a type that does not accept focus?

Here is my code

Javascript
function onClientContextMenuShown(sender, args) 
{ 
     args.get_menu().focus(); 
} 

Markup
<telerik:RadTreeView ID="Favorites" runat="server" EnableEmbeddedSkins="False" Skin="KMNetYellow" Width="220px" EnableViewState="false" 
                                                        OnClientContextMenuShowing="onClientContextMenuShowing" 
                                                        OnClientContextMenuShown="onClientContextMenuShown" 
                                                        OnClientContextMenuItemClicked="onFavoriteFolderMenuClicked" 
                                                        OnClientNodeEditStart="OnClientNodeEditStartHandler" 
                                                        OnClientNodeEdited="OnClientNodeEditEndHandler" 
                                                        OnClientNodeExpanding="OnClientNodeExpanding" 
                                                        OnClientNodeCollapsing="OnClientNodeCollapsing"> 
                                                        <ContextMenus> 
                                                            <telerik:RadTreeViewContextMenu ID="objFavoritesMenu" runat="server" EnableEmbeddedSkins="False" Skin="KMNetGray" EnableViewState="false"> 
                                                                <Items> 
                                                                    <telerik:RadMenuItem runat="server" Text="New Folder" Value="NewFolder" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" IsSeparator="True" Text="----------" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" Text="Copy To ..." Value="Copy" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" Text="Move To ..." Value="Move" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" IsSeparator="True" Text="---------" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" Text="Delete" Value="Delete" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                    <telerik:RadMenuItem runat="server" Text="Rename" Value="Rename" EnableViewState="false"> 
                                                                    </telerik:RadMenuItem> 
                                                                </Items> 
                                                            </telerik:RadTreeViewContextMenu> 
                                                        </ContextMenus> 
                                                        <DataBindings> 
                                                            <telerik:RadTreeNodeBinding ExpandedImageUrl="/images/icon_openfold.gif" EnableContextMenu="true" ImageUrl="/images/icon_clsdfold.gif"/> 
                                                        </DataBindings> 
                                                    </telerik:RadTreeView> 

Thanks in  advance.
Kai Thao

Kai
Top achievements
Rank 1
 answered on 20 Jan 2010
1 answer
111 views
Hi Everyone,

I have a table like that :
 ----------------------------------------
|    id    |    ParentId    |    Name    |
 ----------------------------------------
|    1     |      NULL      |    Field 1   |
|    2     |          1         |    Field 2   |
|    3     |          1         |    Field 3   |
|    4     |          2         |    Field 4   |
|    5     |          3         |    Field 5   |
|    6     |          3         |    Field 6   |
|    7     |          2         |    Field 7   |
|    8     |          1         |    Field 8   |
 -----------------------------------------

Is it possible to group this into the grid in order to have a result displayed like that ? :

 ----------------------------------------
|               My RadGrid                 |
 ----------------------------------------
|    > Grouped By Field 1              |
|        > Grouped by Field 2          |
|           - Field 4                            |
|           - Field 7                            |
|        > Grouped by Field 3          |
|           - Field 5                            |
|           - Field 6                            |
|    > Grouped By Field 8              |
 -----------------------------------------

Then there is inside the same table 3 kind of records:
First level haven't ParentId
Second Level have in ParentId the Id of the first level
Third level have in ParentId the id of the second level

Is it possible ? because right now, I've just achieve to group by ParentId and there is no hierarchy
like that
> First Level
> All the Second Level
>Third Levels
>Third Levels
>...

Thanks in advance
Gaël Huyghe
Radoslav
Telerik team
 answered on 20 Jan 2010
5 answers
193 views
I have HierarchyLoadMode set to ServerBind. When there are many rows in the grid and a vertical scrollbar is shown to allow the user to scroll the rows, if the user expands a row that is near the buttom of the viewable area of the grid, the child grid will be created and expand but the user is required to scroll to see the child rows. Is there a way I can intercept the expand event on the client-side, access the row that was expanded and scroll it to the top of the viewable area? I have to set HierarchyLoadMode to ServerBind due to the large number of records that need to get displayed.
Princy
Top achievements
Rank 2
 answered on 20 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?