Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
102 views
Is it possible to allow users to upload an entire folder using the built-in document manager?  I have a case where a user is responsible for uploading new video tutorials, and those tutorials have many "chapters", so each set of videos are approximately 15 files each per folder.  Ideally I'd love to allow the user to just dump the folder, and not each file by file.  Is this possible? 
Terri-Lynn
Top achievements
Rank 1
 answered on 10 Apr 2012
1 answer
80 views
Hi friends,


We are using RadEditor in our application.Our client wants add his signature from RadEditor(just like we add signature while sending mail).
Can any body help me, how can i do this.
Please provide me some sample code.

Thanks in Advance
Anwar
Rumen
Telerik team
 answered on 10 Apr 2012
1 answer
79 views
Hi
I using Telerik version 2011.3.1122.40 

Please run this Codes:

MasterPage.master:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!doctype html>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <Telerik:RadScriptManager ID="scriptManager" runat="server" />
        <Telerik:RadAjaxManager ID="ajaxManager" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ajax">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ajax" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </Telerik:RadAjaxManager>
        <asp:Panel ID="ajax" runat="server">
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </asp:Panel>
    </form>
</body>
</html>

Default.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <telerik:RadCaptcha ID="captcha" Runat="server"
        CaptchaLinkButtonText="refresh"
        EnableRefreshImage="true">
    </telerik:RadCaptcha>
</asp:Content>

when I click on refresh link, RadCaptcha will be hidden!
Slav
Telerik team
 answered on 10 Apr 2012
8 answers
389 views
I have a question regarding how to find and get the value of asp.net controls that are located within a RadPageView using Javascript.  I have a form where I use the RadTabStrip in conjunction with the RadMultiPage.  Each tab and RadPageView contain a User control which contains several asp.net label controls that display various data. 

I need to access the values of several of these fields using Javascript.  To do so, I had a javascript routine that got a reference to the PageView on the currently selected tab as follows:

// This function returns a reference to the pageview of the currenlty selected tab.
function GetCurrPageView() {
    var rtabCarrLoc = $find("<%= rtabCarrierInfo.ClientID %>");
    var rselectedtab = rtabCarrLoc.get_selectedTab();
    if (rselectedtab) {
        var rpageview = rselectedtab.get_pageView();
        return rpageview;
    }
}

The plan was then to use that reference to find, for example, a label control and extract its value.  This proved difficult since the RadPageView does not seem to provide any methods to find controls contained within it.

I opened a support ticket with Telerik to solve this problem.  They provided a solution to extract the contents of a label by using a unique CSS class by which I could find the label and get the contents.  See the following for an example:

// Get and set the location name.
var rpageview = GetCurrPageView();
if (rpageview) {
    var lblLocName = $telerik.$(".cdhdr-carrlocationheader", rpageview._element).html();
    if (lblLocName) {
        var DULocName = document.getElementById("<%= lblDataUpdLocName.ClientID %>");
        DULocName.innerText = lblLocName;
    }
}

The ".cdhdr-carrlocationheader" is the custom css class assigned to the label control that I extracted the value for.  This works althought they never did explain exactly how.  I have no idea what the "$telerik.$" function is, the parameters it offers, or how it works.

Anyway, my problem now is that I would also like to be able to find some "HiddenFields" on the pageview and extract their values.  The above solution will not work for them since you cannot assign a CSS class to a Hiddenfield. 

Does anyone know how I could do this?  Any help would be greatly appreciated.
msigman
Top achievements
Rank 2
 answered on 10 Apr 2012
1 answer
1.8K+ views
I have wired up an ItemDataBound handler for my radgrid.  Pretty simple standard fare (see code snippet below).  However, I've noticed while stepping through the debugger on this that when the column value that I'm retrieving is an empty string, I'm actually getting back "&nbsp;"... so my code never thinks it's an empty string...  I realize I could code something that looks for "&nbsp;" but that seems fragile.  

So I was wondering how I would access not the value from the radgrid column (which appears to be applying some formatting or whatever), but the actual, true blue underlying value from the data source. 

Any references on how to do so would be greatly appreciated.
 
protected void gvMain_ItemDataBound(object sender, GridItemEventArgs e)
   {
       if (e.Item is GridDataItem)
       {
           GridDataItem gridRow = (GridDataItem)e.Item;
           bool hasEamil = (gridRow["Email"].Text.Length > 0);
       }
   }
Eyup
Telerik team
 answered on 10 Apr 2012
5 answers
523 views
I have a couple fields that are notes fields that i do not put into my radgrid, but when I export I need to go and get them asn export them as well.  Is there a way to export the radgrids needdatasource?

<CommandItemTemplate>
                                      <table width="100%">
                                          <tr>
                                              <td align="right"><asp:Button ID="btnExport" runat="server" CommandName="ExportToExcel" Text="Export Excel" /></td>
                                          </tr>
                                      </table>
                                  </CommandItemTemplate>

Kevin
Top achievements
Rank 1
 answered on 10 Apr 2012
3 answers
140 views
When there are multiple column headers with the same name, the radgrid keeps adding a number to the end of the header. For example if I have repeating column headers that are aa, bb, cc, aa, bb, cc, aa, bb, cc the radgrid displayes them as aa, bb, cc, aa1, bb1, cc1, aa2, bb2, cc2 and so on. Is there a way to turn this off.
This is my code:
  <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource3" Skin="Simple"
                CellSpacing="0" GridLines="None" Font-Size="8pt" CellPadding="0"  Wrap="False">
                <MasterTableView DataSourceID="SqlDataSource3" CommandItemDisplay="Top" Font-Size="8" CellPadding="0" Wrap="False">
                    <ItemStyle Wrap="False" />
                    <CommandItemTemplate>
                        <%=gridHeader%>
                    </CommandItemTemplate>
                    <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                        ShowExportToCsvButton="true" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <HeaderStyle Font-Size="8pt" Font-Underline="False" Wrap="False" />
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>



 Thanks in advance.
Eyup
Telerik team
 answered on 10 Apr 2012
2 answers
217 views
Hi, I'd like to ask help on how can I access (set / get control's value)  inside my RadPanelItem

Here's the scenario, I have this source code below.
OnClientClose(oWnd), gives me the arguments I need (Name and NameId).
However, I want to set the value back to LabelName and LabelNameId.

Pelase help.

Thanks!


<script type="text/javascript"
        //<![CDATA[
        function openWin()
        {
            var oWnd = radopen("../Common/SelectCompany.aspx?Typ=", "RadWindow1");
            //oWnd.setSize(340, 340);
            //set a function to be called when RadWindow is closed
            oWnd.add_close(OnClientClose);
        }
        function OnClientClose(oWnd) {
            //get the transferred arguments
            var Name = oWnd.argument.Name;
            var NameId = oWnd.argument.NameId;
            
            //????
            $get("LabelName").value = Name;
        }
        //]]> 
    </script> 
 
 
<telerik:RadPanelBar runat="server" ID="RadPanelBar1" Skin="Gray" Width="100%" Height="550px"
    <CollapseAnimation Type="None"></CollapseAnimation>     
    <Items> 
        <telerik:RadPanelItem Text="RadPanelItem7" Expanded="True" PreventCollapse="true"
            <Items> 
                <telerik:RadPanelItem runat="server" Value="RadPanelItem7"
                    <ItemTemplate> 
                        <table width="100%"
                            <tr> 
                                <td width="100px" class="style2">Name: </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td class="style2">Long Name: </td> 
                                <td> 
                                    <asp:Label ID="LabelName" runat="server" Text="Please select..."></asp:Label> 
                                    <asp:imagebutton id="btnSearch" runat="server" CausesValidation="False" 
                                        ImageUrl="~/Images/find.gif" ToolTip="Search"></asp:imagebutton> 
                                    <button onclick="openWin(); return false;"
                                        Select</button> 
                                    <asp:Label ID="LabelNameId" runat="server"></asp:Label> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td class="style2">Status: </td> 
                                <td><asp:DropDownList ID="ddlStatus" runat="server"></asp:DropDownList></td
                            </tr>     
                        </table> 
                        <br /> 
                    </ItemTemplate>           
                </telerik:RadPanelItem>               
            </Items> 
        </telerik:RadPanelItem> 
        <telerik:RadPanelItem Text="RadPanelItem9" Expanded="True"
            <Items> 
                <telerik:RadPanelItem runat="server" Value="RadPanelItem9"
                    <ItemTemplate>     
                    List...               
                    <br /><br /> 
                    </ItemTemplate>           
                </telerik:RadPanelItem>               
            </Items> 
        </telerik:RadPanelItem> 
        <telerik:RadPanelItem Text="RadPanelItem8" Expanded="True"
            <Items> 
                <telerik:RadPanelItem runat="server" Value="RadPanelItem8"
                    <ItemTemplate>  
                    List...                                          
                    <br /><br /> 
                    </ItemTemplate>           
                </telerik:RadPanelItem>               
            </Items> 
        </telerik:RadPanelItem> 
    </Items> 
    <ExpandAnimation Type="None"></ExpandAnimation> 
</telerik:RadPanelBar> 
</div> 
<telerik:RadWindowManager Modal="true"  
    Behaviors="Maximize,Minimize,Move,Pin,Reload,Resize,Close"  
        ID="RadWindowManager1" ShowContentDuringLoad="true" runat="server"   
        VisibleStatusbar="false" 
         Width="400px" Height="400px" 
        Skin="Default"
</telerik:RadWindowManager> 



christian
Top achievements
Rank 1
 answered on 10 Apr 2012
5 answers
170 views
Hi,
Iam using rad control inside modal popup in asp.net 3.5, and getting following Error. So please tell me why iam getting this error.
Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_ContentPlaceHolder1_RadCalendar1' can't be added to the application.
Antonio
Top achievements
Rank 1
 answered on 10 Apr 2012
1 answer
117 views
Hello,

How to display context menu at left mouse click of gridbutton. Context menu is displayed on right mouse click at grid button but i want to display it at left mouse click.

Thanks in advance.
Sigma
Princy
Top achievements
Rank 2
 answered on 10 Apr 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?