Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
117 views
I need to disable or remove cssEditor.css from presetation mode in edit mode its fine to have it. please let me know how i can achieve this.

Thanks,
amit
Stanimir
Telerik team
 answered on 20 Apr 2010
1 answer
144 views
Hi,

I have some problems with the RadMenu component:

1. I want to be able to disable/remove certain RadMenuItems on the server-side, and have not found any way to identify the menu items since their IDs are not settable.
(http://demos.telerik.com/aspnet-ajax/menu/examples/programming/addremovedisableitemsclientside/defaultcs.aspx did not help either)

2. Is there any way of setting a button in a RadMenuItem as TargetControl for UpdatePanels och ModalPopupExtenders?
My work-around has been to set the entire RadMenu as a Trigger for UpdatePanels and to trigger postbacks and manually show modal popups, but I'm not totally satisfied with this.

Any suggestions?

Thanks!
Yana
Telerik team
 answered on 20 Apr 2010
5 answers
332 views
I'm having an issue with the numeric input control settings in the input manager.  I have a grid that is using ajax for its commands.  When one of those commands is executed, the numeric inputs lose their focus.  This would potentially not be a big problem, except that their values are lost when the user put focus on the numeric input.

You can actually see this happening in your demo here
http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/databinding/defaultcs.aspx


To reproduce, just click on one of the commands in the DateInputSetting grid.  For instance, if you click the cancel button on the row that is in edit mode, you will notice the editable numeric box in the NumericTextBoxSetting loses it's formatting.  Then all you have to do is click inside that box to see that it disappears when it gets focus.

Is there any way that this could be worked around easily?  I have quite a few controls on my form that are using the NumericTextBoxSetting functionality.
Radoslav
Telerik team
 answered on 20 Apr 2010
1 answer
284 views
Hi,

    i am using rad menu control to achieve horizontal menu and i have an issue in css
i need to remove borders and change alignment to center align.please give a solution for this
i have attached screen shot with current and required screen shot

this css is i am using

 

/* RadMenu Black skin */ 
 
.RadMenu_Black   
{  
    background#1e1e1e;  
}  
 
.RadMenu_Black_rtl  
{  
    text-alignrightright;  
}  
 
.RadMenu_Black_Context  
{  
    backgroundnone;  
    border: 0;  
}  
 
.RadMenu_Black a  
{  
    text-decorationnone;  
}  
 
.RadMenu_Black .rmLink,  
.RadMenu_Black .rmTemplate  
{  
    fontnormal 12px/25px "Segoe UI""Myriad Pro"Arialsans-serif;  
    text-decorationnone;  
    color#9f9f9f;  
    padding-left:3px;  
}  
 
.RadMenu_Black .rmLink:focused,  
.RadMenu_Black .rmFocused  
{  
    outline: 0;  
}  
 
.RadMenu_Black .rmRootGroup .rmLink:hover,  
.RadMenu_Black .rmRootGroup .rmFocused,  
.RadMenu_Black .rmRootGroup .rmExpanded  
{  
    backgroundtransparent url(Menu/SelectedBgRoot.gif) no-repeat 0 4px;  
    color#fff;  
}  
 
.RadMenu_Black .rmRootGroup .rmLink:hover .rmText,  
.RadMenu_Black .rmRootGroup .rmFocused .rmText,  
.RadMenu_Black .rmRootGroup .rmExpanded .rmText  
{  
    backgroundtransparent url(Menu/SelectedBgRoot.gif) no-repeat rightright 4px;  
}  
 
.RadMenu_Black .rmGroup .rmLink:hover,  
.RadMenu_Black .rmGroup .rmFocused,  
.RadMenu_Black .rmGroup .rmExpanded,  
.RadMenu_Black .rmGroup .rmLink:hover .rmText,  
.RadMenu_Black .rmGroup .rmFocused .rmText,  
.RadMenu_Black .rmGroup .rmExpanded .rmText  
{  
    backgroundtransparent url(Menu/SelectedBgSubitem.gif) repeat-x 0 0;  
}  
 
.RadMenu_Black .rmRootGroup .rmLink,  
{  
    margin-right5px;  
    overflowvisible;  
}  
 
.RadMenu_Black_rtl .rmRootGroup .rmLink  
{  
    margin: 0 0 0 5px;  
}  
 
.RadMenu_Black .rmRootGroup .rmLink .rmText  
{  
    margin-right:-1px;  
}  
 
.RadMenu_Black .rmGroup  
{  
    background#383838;  
    border1px solid #1c1c1c;  
}  
 
.RadMenu_Black .rmHorizontal  
{  
    height33px;  
    background#383838 url(Menu/Background.gif) repeat-x top left 
}  
 
.RadMenu_Black .rmGroup .rmHorizontal  
{  
    height21px;  
    background#383838;  
}  
 
.RadMenu_Black .rmGroup .rmLink  
{  
    text-decorationnone;  
    color#9f9f9f;  
    line-height15px;  
    margin: 0;  
    font-size11px;  
}  
 
.RadMenu_Black .rmGroup .rmTemplate  
{  
    padding-left7px;  
}  
 
.RadMenu_Black_rtl .rmGroup .rmLink,  
.RadMenu_Black_rtl .rmGroup .rmTemplate  
{  
    text-alignrightright;  
    padding-right:0;  
}  
 
.RadMenu_Black .rmText  
{  
    padding4px 20px 0;  
}  
 
.RadMenu_Black .rmGroup .rmLink .rmText  
{  
    padding3px 30px 3px 24px;  
    margin-left: 0;  
    margin-right: 0;  
}  
 
.RadMenu_Black_rtl .rmGroup .rmLink .rmText  
{  
    padding3px 24px 3px 30px;  
Yana
Telerik team
 answered on 20 Apr 2010
8 answers
196 views
Hi,

I'm using the ASP.NET RadGrid for AJAX and I have an asp LinkButton in my grid's CommandItemTemplate.

I am trying to set the linkbutton's Visible property to True, when a user selects a row in the grid.  When no row is selected, the control should not be visible.

<CommandItemTemplate>
<
asp:LinkButton ID="CopyJobFunctionButton" runat="server" CommandName="CopyJobFunction" Visible="<%# GridViewLeft.SelectedItems.Count > 0 %>"></asp:LinkButton>
</CommandItemTemplate>

I have tried to set the Visible property to the statement shown above, thinking that as soon as an item is selected, the SelectedItems.Count will be greater than 0 and that will return True.

That is not working.  The LinkButton does NOT show up when a row is selected.

What can I be doing wrong?  Or how else can I achieve this?

Thanks,
Brent

Sebastian
Telerik team
 answered on 20 Apr 2010
1 answer
90 views
Hi,

I have installed latest version of radeditor 5.7.

Embedded video working fine in edit mode and preview works fine as well. But view mode doesnt show the video at all.

Please help me out if somebody faced the same issue.

Thanks,
Amt
Stanimir
Telerik team
 answered on 20 Apr 2010
1 answer
143 views
Hi All - I am using current build of aspjax controls. I have been having a real problem getting columns to line up in hierarchical self referencing grid. I have gone through all the other posts here that I could find to no avail... :


http://www.telerik.com/support/kb/aspnet-ajax/grid/aligning-columns-in-each-level-of-self-referencing-grid.aspx

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx
http://www.telerik.com/community/forums/aspnet-ajax/grid/self-referencing-hierarchy-on-radgrid.aspx


however, I finally figured out a tweak that seems to work for me, so I thought I would post for everyone.

The symotom is that I get a graduated spacing as the columns move left, and which is differnt in scale as I go down in hierarchical level. I have attached example of problem.

To fix it, I have to pad the cells with different settings depending on where they fall in the grid. The code that seems to work for me is here:

 Public Sub Page_PreRenderComplete(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.PreRenderComplete
        HideExpandColumnRecursive(RadGrid1.MasterTableView)
    End Sub
    
    Public Sub HideExpandColumnRecursive(ByVal tableView As GridTableView)
        Dim nestedViewItems As GridItem() = tableView.GetItems(GridItemType.NestedView)
        For Each nestedViewItem As GridNestedViewItem In nestedViewItems
            nestedViewItem.HorizontalAlign = HorizontalAlign.Right
            For Each nestedView As GridTableView In nestedViewItem.NestedTableViews
                nestedView.HorizontalAlign = HorizontalAlign.Right
                nestedView.Style("border") = "0"
                nestedView.Style("padding-left") = "0px"
                nestedView.Style("padding-right") = "0px"
                Dim MyExpandCollapseButton As Button = DirectCast(nestedView.ParentItem.FindControl("MyExpandCollapseButton"), Button)
                If nestedView.Items.Count = 0 Then
                    If Not IsNothing(MyExpandCollapseButton) Then
                        MyExpandCollapseButton.Style("visibility") = "hidden"
                    End If
                    nestedViewItem.Visible = False
                Else
                    If Not IsNothing(MyExpandCollapseButton) Then
                        MyExpandCollapseButton.Style.Remove("visibility")
                    End If
                    
                     
                    'Need to set graduate padding for lower level to avoid V alignment problem
                    For Each item As GridItem In nestedView.Items
                        Dim level As Integer = item.ItemIndexHierarchical.Split(":"c).Length
                        If level = 2 Then
                            
                            Dim nPad As Integer = 0
                            For i As Integer = 2 To item.Cells.Count - 1  'ignore first col
                                If i < 6 Then
                                    nPad = 18
                                ElseIf i > 5 And i < 10 Then
                                    nPad = 12
                                Else
                                    nPad = 8
                                End If
                                item.Cells(i).Style("padding-right") = nPad & "px !important"
                            Next
                        End If
                        
                        If level = 3 Then
                            
                            Dim nPad As Integer = 0
                            For i As Integer = 2 To item.Cells.Count - 1  'ignore first col
                                If i < 6 Then
                                    nPad = 25
                                ElseIf i > 5 And i < 7 Then
                                    nPad = 20
                                ElseIf i > 6 And i < 10 Then
                                    nPad = 15
                                Else
                                    nPad = 10
                                End If
                                item.Cells(i).Style("padding-right") = nPad & "px !important"
                            Next
                        End If
                    Next
                   
                    
                    
                End If
 
                If nestedView.HasDetailTables Then
                    HideExpandColumnRecursive(nestedView)
                End If
            Next
        Next
    End Sub
Dimo
Telerik team
 answered on 20 Apr 2010
1 answer
312 views
I can't understand why my RadGrid doesn't work. Nothing triggers when i press delete, update! The Ajax image just comes up. And if i select a row the SelectColumn gets selected but triggers an Ajax update and the checkbox gets unchecked!

<%@ Page Language="C#" MasterPageFile="~/Page.Master" AutoEventWireup="true" CodeBehind="ManageUsers.aspx.cs" Inherits="Adeprimo.Tulo.Web.User.Administration.ManageUsers" Title="Untitled Page" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ctpHead" runat="server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ctpMain" runat="server"
    <div id="Layout"
        <div class="typography"
            <h2><asp:Literal runat="server" ID="litLocalizationForgotPassword" Text="<%$ Resources:Default,User_ManageUsers%>" /></h2
        </div> 
    </div> 
    <div style="clear: both;"
        <telerik:RadAjaxManager ID="RadAjaxManager" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="rdgUsers"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rdgUsers" LoadingPanelID="RadAjaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>                                                   
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" /> 
    </div> 
    <telerik:RadGrid ID="rdgUsers" runat="server" EnableEmbeddedSkins="true" Skin="Black" AllowSorting="true" AllowMultiRowSelection="true" 
        OnUpdateCommand="UpdateCommand" OnInsertCommand="InsertCommmand" OnDeleteCommand="DeleteCommand"
        <MasterTableView Width="100%" ShowHeadersWhenNoRecords="true" HorizontalAlign="NotSet" 
            ExpandCollapseColumn-Display="true" AutoGenerateColumns="False" 
            DataKeyNames="UserName" EditItemStyle-HorizontalAlign="Left" > 
            <Columns> 
                <telerik:GridClientSelectColumn UniqueName="column" /> 
                <telerik:GridBoundColumn DataField="UserName" HeaderText="User Name" UniqueName="UserName" /> 
                <telerik:GridTemplateColumn DataField="Email" UniqueName="Email" HeaderText="Email" Visible="true"
                    <ItemTemplate> 
                        <%#DataBinder.Eval(Container.DataItem, "Email")%> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <telerik:RadComboBox ID="rcbCoutry" runat="server" AppendDataBoundItems="true" DataTextField="Country" DataValueField="Country"
                            <Items> 
                                <telerik:RadComboBoxItem Text="Sverige" Value="0" Visible="false" /> 
                                <telerik:RadComboBoxItem Value="1" Text="Finland" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
                <telerik:GridBoundColumn DataField="IsApproved" HeaderText="Is Approved" UniqueName="IsApproved" /> 
                <telerik:GridBoundColumn DataField="LastLoginDate" HeaderText="Last Login" UniqueName="LastLoginDate" /> 
                 
                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCustomer" 
                    EditText="Edit" ItemStyle-HorizontalAlign="Right"
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn ConfirmText="Are you sure you wan't to delete this user?" ConfirmDialogType="RadWindow" 
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" 
                    UniqueName="DeleteColumn"
                </telerik:GridButtonColumn> 
            </Columns> 
            <EditFormSettings EditColumn-UpdateText="Uppdatera" EditFormType="AutoGenerated"
                <EditColumn ButtonType="PushButton" UpdateText="Update" EditText="Edit" 
                    EditFormColumnIndex="5" FooterStyle-BorderStyle="Solid" HeaderButtonType="PushButton" 
                    InsertText="Save" CancelText="Cancel"
                </EditColumn> 
            </EditFormSettings> 
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PagerTextFormat="{4}Sida {0} av {1}, visar användare {2} av {3} av totalt {5}" 
                FirstPageToolTip="Första sidan" NextPageToolTip="Nästa sida" PrevPageToolTip="FöregÃ¥ende sida" 
                LastPageToolTip="Sista sidan"></PagerStyle> 
            <NoRecordsTemplate> 
                <div style="text-align: center; line-height: 25px;"
                    <strong>No Users Found!</strong> 
                </div> 
            </NoRecordsTemplate> 
        </MasterTableView> 
        <ClientSettings EnablePostBackOnRowClick="true" Selecting-AllowRowSelect="True"
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
</asp:Content> 


using System; 
using System.Web.Security; 
using Telerik.Web.UI; 
 
namespace Adeprimo.Tulo.Web.User.Administration 
    public partial class ManageUsers : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            //Bind dgUsers with all Users 
            rdgUsers.DataSource = Membership.GetAllUsers(); 
            rdgUsers.DataBind(); 
        } 
        #region Add, Update, Delete Member 
        /// <summary> 
        /// Add new member 
        /// </summary> 
        /// <param name="source"></param> 
        /// <param name="e"></param> 
        protected void InsertCommmand(object source, GridCommandEventArgs e) 
        { 
        } 
        /// <summary> 
        /// Update member 
        /// </summary> 
        /// <param name="source"></param> 
        /// <param name="e"></param> 
        protected void UpdateCommand(object source, GridCommandEventArgs e) 
        { 
        } 
 
        /// <summary> 
        /// Delete member 
        /// </summary> 
        /// <param name="source"></param> 
        /// <param name="e"></param> 
        protected void DeleteCommand(object source, GridCommandEventArgs e) 
        { 
            GridEditableItem item = (GridEditableItem)e.Item; 
            Membership.DeleteUser(e.Item.OwnerTableView.Items[e.Item.ItemIndex]["UserName"].Text); 
        } 
        #endregion 
    } 

Princy
Top achievements
Rank 2
 answered on 20 Apr 2010
3 answers
240 views
HI,
    I have textbox in one of the Radgrid Column.
I want to use tooltip for these textboxes. The tooltip has to show the corresponding Texbox values.
Let me know how to implement this?



Thank You.
Dimo
Telerik team
 answered on 20 Apr 2010
3 answers
502 views
Hi expert,

I have a Grid with some columns that allow filters. When the page is rendered for the first time, I hided all filters using this client side code :
function pageLoad(sender, args)
{
    $find('<%=Grid.ClientID %>').get_masterTableView().hideFilterItem();
}

for each column that allow filter, I want to show the filter on the click on this column. I use the ColumnClick event to do that, but I'm not able to do that. I want some client side code like :

function ColumnClick(columnName)
{
        var masterTable = $find('<%=Grid.ClientID %>').get_masterTableView();
        masterTable.get_columns()[columnName].AllowFiltering = true;
}

I know that I can do that using server side code, but I don't want to that.
I hope that you have some Javascript code to acheive my goal.

thank you for you help.

Hakim
Maria Ilieva
Telerik team
 answered on 20 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?