Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
84 views
One of my menu items serves as a login/logout button. I need to change the text of this menu item based on if they are logged in or out. I noticed there are no individual id's on each of the menu items. How do I get at the menu item without using ordinal positions or writing traversing code? Thanks guys!
Darren
Top achievements
Rank 2
 answered on 02 May 2012
2 answers
135 views
Hello, I have a radEditor which is located within the content template of a radWindow. This radWindow is displayed to a user using the radWindow's VisibleOnPageLoad property (server side). I've added a handler for the OnClientShow event of the radWindow and in it I call the editor's onParentNodeChanged method. Everything works as expected in IE and FF. Chrome users, however, get the window and the editor but are unable to type anything in the content area. I can click the buttons in the toolbar cannot type in the content area. I went ahead and enabled the HTML edit mode and when I chose this mode I was able to type in the content area but when I switched back to the Design mode (default) there was no text in the content area. I'm not sure what I'm missing? I am on the latest build of Telerik. Thanks.
Hunter
Top achievements
Rank 1
 answered on 02 May 2012
1 answer
466 views
Hello,

We couldn't fire our Insert/Update command int the RadGrid when editing the row.
We have tried almost every solutions given on this forum without success.

Some information about our code situation :
 - The code is in a Web Controls (details.ascx)
 - We have disabled Ajax
 - The code is in a RadPageView, that is in an UpdatePanel
 
 The code from ASP.NET
<telerik:RadGrid ID="__linksRadGrid" runat="server"
        AllowMultiRowEdit="false"
        ShowStatusBar="true"
        GridLines="None"
        AllowPaging="False"  
        AllowAutomaticUpdates="false"
        AllowAutomaticInserts="false"
        OnNeedDataSource="LinksRadGrid_NeedDataSource"                      
        OnInsertCommand="LinksRadGrid_InsertCommand"
        OnUpdateCommand="LinksRadGrid_UpdateCommand"
        OnDeleteCommand="LinksRadGrid_DeleteCommand"
        OnItemDataBound="LinksRadGrid_ItemDataBound"
        OnItemCommand="LinksRadGrid_ItemCommand"
        AllowSorting="true"
        Skin="Transparent"
        Width="450px">
    <MasterTableView AutoGenerateColumns="False"
            DataKeyNames="IdAttachment"
            CommandItemDisplay="Bottom" >
        <PagerStyle Mode="NextPrevAndNumeric" />
        <CommandItemTemplate>
            <div style="padding: 5px 5px;">
                <asp:ImageButton ID="imgInsert" runat="server"
                        ImageUrl="~/App_Themes/Default/Images/Icons/add2.gif"
                        CommandName="InitInsert"
                        AlternateText="Insert New Record"                
                        ToolTip = "Insert New Record" />
                  
                <asp:ImageButton ID="imgRefresh" runat="server"
                        ImageUrl="~/App_Themes/Default/Images/Icons/refresh.png"
                        CommandName="RebindGrid"
                        AlternateText="Refresh the grid"                
                        ToolTip = "Refresh the grid" />
            </div>
        </CommandItemTemplate>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" />
 
            <telerik:GridBoundColumn DataField="Title"
                    DataType="System.String"
                    HeaderText="Title"
                    SortExpression="Title"
                    UniqueName="Title">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Description"
                    DataType="System.String"
                    HeaderText="Description"
                    SortExpression="Description"
                    UniqueName="Description">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="AttachmentType"
                    DataType="System.String"
                    HeaderText="AttachmentType"
                    SortExpression="AttachmentType"
                    UniqueName="AttachmentType"
                    Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Url"
                    DataType="System.String"
                    HeaderText="Url"
                    SortExpression="Url"
                    UniqueName="URL"
                    Display="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn 
                    HeaderText="Type" 
                    UniqueName="Type">
                <ItemTemplate>
                    <asp:ImageButton ID="__attachedTypeImageButton" runat="server" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
 
            <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton"
                    ConfirmText="Delete this record?"
                    ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" />
 
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>
            <FormTemplate>
                <table cellspacing="2" cellpadding="1" width="100%" border="0">
                    <tr>
                        <td>
                            <asp:Label ID="__titleLabel" runat="server"
                                    Text="Title">
                            </asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="_titleTextBox" runat="server"
                                    Width="100px"
                                    Text='<%# Bind("Title") %>' >
                            </asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="__decriptionLabel" runat="server"
                                    Text="Description">
                            </asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="__decriptionTextBox" runat="server"
                                    Width="100px"
                                    TextMode="MultiLine"
                                    Rows="4"
                                    Text='<%# Bind("Description") %>'>
                            </asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="__URLLabel" runat="server"
                                    Text="URL">
                            </asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="__urlTextBox" runat="server"
                                    Width="255px"
                                    Text='<%# Bind("URL") %>' >
                            </asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="__orLabel" runat="server"
                                    Text="or">
                            </asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="__fileUploadLabel" runat="server"
                                    Text="File">
                            </asp:Label>
                        </td>
                        <td>
                            <asp:FileUpload ID="__fileUpload" runat="server" />
                        </td>
                    </tr>
                    <tr>
                         <td align="right" colspan="2">
                            <asp:Button ID="btnUpdate" runat="server"
                                    Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    CausesValidation="True" >
                            </asp:Button
                              
                            <asp:Button  ID="btnCancel" runat="server"
                                    Text="Cancel"
                                    CausesValidation="False"
                                    CommandName="Cancel">
                            </asp:Button >
                        </td>
                    </tr>
                </table>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</telerik:RadGrid>

The C# code of code-behind
protected void LinksRadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) {
     
    List<Attachment> attachmentList = AttachmentBLL.GetByIdDocument(this.IdDocument);
    DataTable dt = this.ToDataTable<Attachment>(attachmentList);
 
    __linksRadGrid.DataSource = dt;
}
 
protected void LinksRadGrid_ItemDataBound(object sender, GridItemEventArgs e) {
 
    if (e.Item is GridDataItem) {
        GridDataItem gridDataItem = (GridDataItem)e.Item;        
 
        int attachedType = int.Parse(gridDataItem["AttachmentType"].Text);
        ImageButton image = (ImageButton)gridDataItem["Type"].FindControl("__attachedTypeImageButton");
         
        if (attachedType == 4
                && !string.IsNullOrEmpty(gridDataItem["URL"].Text)) {
 
            image.ImageUrl = "~/App_Themes/Default/Images/Icons/web.png";
            image.OnClientClick = this.WindowsOpenPopup(gridDataItem["URL"].Text);
        }
        else if (attachedType == 5) { // Type document
                         
            int idAttachment = int.Parse(gridDataItem["IdAttachment"].Text);
                             
            image.ImageUrl = "~/App_Themes/Default/Images/Icons/pdf16.png";
            image.OnClientClick = this.GetAttachmentLinksUrl(idAttachment);
        }
        else {
 
            this.ShowImageError(image, "Error : wrong data error! Please correct your data.");               
        }
    }
}
 
 
protected void LinksRadGrid_ItemCommand(object source, GridCommandEventArgs e) {
 
    if (e.CommandName == "Update" && e.Item is GridEditFormItem) {
        GridEditFormItem editFormItem = (GridEditFormItem)e.Item;
    }
}
 
protected void LinksRadGridUpdate_Click(object sender, EventArgs e) {
 
    if (IsPostBack) {
 
    }
 
}
 
protected void LinksRadGrid_InsertCommand(object sender, GridCommandEventArgs e) {
 
    GridEditableItem editedItem = e.Item as GridEditableItem;
}
 
protected void LinksRadGrid_UpdateCommand(object sender, GridCommandEventArgs e) {
 
    if (e.CommandName == RadGrid.UpdateCommandName) {
        if (e.Item is GridEditFormItem) {
            GridEditFormItem item = (GridEditFormItem)e.Item;
        }
    }
}
protected void LinksRadGrid_DeleteCommand(object sender, GridCommandEventArgs e) {
 
    GridEditableItem editedItem = e.Item as GridEditableItem;
}
 



Thank for your help



LevizBB
Top achievements
Rank 1
 answered on 02 May 2012
2 answers
207 views
I've created two radio buttons

<telerik:RadButton ID="rbOption1" runat="server" Text="option 1" ToggleType="Radio"
    GroupName="group1" ButtonType="ToggleButton" />
<br />
<telerik:RadButton ID="rbOption2" runat="server" ToggleType="Radio"
    GroupName="group1" ButtonType="ToggleButton">
    <ContentTemplate>
        <asp:Label ID="lblChoose" runat="server" Text="choose" />
        <asp:DropDownList ID="ddlChoose" runat="server" />
    </ContentTemplate>
</telerik:RadButton>

I want the second radbutton to be rendered with a radio button just the the first radbutton. But instead the entire contents of the content template is being rendered as an html anchor. Is there a way to use the radbutton to look like my attached mockup?
Brian
Top achievements
Rank 1
 answered on 02 May 2012
5 answers
367 views
I have a question, how i can Get the value of a Cell in a RadGrid and pass it to a RadTextBox using the Client Event "OnRowSelected"??

thanks.
Joswhar
Top achievements
Rank 2
 answered on 02 May 2012
1 answer
82 views
Hi,

I have a scenario that I'm hoping someone here can provide guidance on...

I have a RadGrid programmed so that when a row is selected it populates a user control elsewhere on the page and the row in the grid is highlighted as selected. If a user has entered or changed information for that item in the user control and then tries to select another row without saving, I've used javascript to remind them to save. If they select OK, it ignores the changes and loads the new item from the newly selected row. If they select Cancel, it prevents the page from posting.

I've first used the OnRowClick ClientEvent, and it would work as I expected, but the newly selected row would still be shown as "selected" even if I canceled the postback. I then tried the OnClientSelecting ClientEvent and it prevented the newly selected row from displaying as "selected", but the current row still lost it's "selected" row styling. What event should I use to prevent the currently selected row from losing its highlighted "selected" styling in the grid if the user selects "Cancel"?

Thanks for any help!

Smith
Martin
Telerik team
 answered on 02 May 2012
7 answers
152 views

We are using lots of telerik control almost all the pages of our application.
we are failed for 508 compliance  1194.22 (i). the below message is displaying on validating the page. we have fix it for RadMenu by adding the enableoverlay = false.

  • IFRAME-3
    • Name not specified
    • Longdesc not specified
    • Title not specified
    • Src="javascript:'';"
  • IFRAME-4
    • Name not specified
    • Longdesc not specified
    • Title not specified
    • Src="javascript:'';"

It would be great if you can suggest what all control and there fixes pertaining to 508 section 1194.22 (i)  for iframe test

Rumen
Telerik team
 answered on 02 May 2012
3 answers
61 views
Hi,
I am having a problem with some custom CSS that my company created for the rad context menu. It does not show the "More items" type of arrows (or any indication that there's more items) when there are more items than can be shown in the menu.

The menu is expanding to the right, but the place where I want to show the menu is the vertical sub-menu. What CSS tag do I need to include for this?

thanks!
Kate
Telerik team
 answered on 02 May 2012
1 answer
72 views
Hi,

I have a RadListBox on a RadTooltip control.  When I am trying to drag an item from the radlistbox; the text displayed along with the mouse cursor seen in the background of the RadTooltip window.  Kindly suggest a solution for this.  Please find the markup of sample page which can demonstrate the issue.  A screen capture also has been attached for further clarity.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ToolTipDragIssue.WebForm1" %>
  
<%@ 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>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManager1" />
    <asp:Button ID="Button1" runat="server" Text="Click Here" />
    <div>
        <telerik:RadToolTip ID="RadToolTip1" runat="server" ShowEvent="OnClick" TargetControlID="Button1" HideEvent="ManualClose"
                <telerik:RadListBox ID="RadListBox1" runat="server" Width="200px" Height="200px"
            AllowTransfer="true" AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true">
            <Items>
                <telerik:RadListBoxItem Text="Test Item 1 Test Item 1 Test Item 1 " />
                <telerik:RadListBoxItem Text="Test Item 2 Test Item 2 Test Item 2 "/>
                <telerik:RadListBoxItem Text="Test Item 3 Test Item 3 Test Item 3 "/>
                <telerik:RadListBoxItem Text="Test Item 4 Test Item 4 Test Item 4 " />
            </Items>
        </telerik:RadListBox>
        </telerik:RadToolTip>
  
    </div>
    </form>
</body>
</html>

Thanks,
James
Marin Bratanov
Telerik team
 answered on 02 May 2012
1 answer
99 views
Hi,

What is the simple way to open a tooltip confirmation window from RadTextBox incorporated Button?
Thanks,

Marcio Nascimento
Marin Bratanov
Telerik team
 answered on 02 May 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?