Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views
Hello,

Please check attached image for issue.

<telerik:RadOrgChart ID="RadOrgChart1" runat="server">
           <ItemTemplate>
               <asp:Image ID="Image1" runat="server" ImageUrl="http://2.bp.blogspot.com/_LBAtNnpRN7k/S_DfBlu9Q7I/AAAAAAAAPTE/znoECHLIizM/s200/User+Accounts+in+Windows.jpg"
                   Width="30px" Height="30px" />
                
               Name:
               <asp:Label ID="Label1" runat="server" Text='<%# Eval("Certificates") %>'></asp:Label>
               
               <asp:Label ID="Label2" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
             <br />
           </ItemTemplate>
           <RenderedFields>
               <NodeFields>
                   <telerik:OrgChartRenderedField DataField="TeamName" Label="Team" />
               </NodeFields>
                 <ItemFields>
                   <telerik:OrgChartRenderedField DataField="Certificates" Label="Certificates" />
                   <telerik:OrgChartRenderedField DataField="Text" Label="Text" />
               </ItemFields>
           </RenderedFields>
       </telerik:RadOrgChart>
protected void Page_Load(object sender, EventArgs e)
       {
 
            
 
           DataTable nodeTable = new DataTable();
           nodeTable.Columns.Add("ID");
           nodeTable.Columns.Add("ParentID");
           nodeTable.Columns.Add("TeamName");
 
           nodeTable.Rows.Add(new String[] { "1", null, "Management" });
           nodeTable.Rows.Add(new String[] { "2", "1", "Unit" });
           nodeTable.Rows.Add(new String[] { "3", "2", "Dev" });
           nodeTable.Rows.Add(new String[] { "4", "2", "Research" });
 
           DataTable itemsTable = new DataTable();
           itemsTable.Columns.Add("NodeID");
           itemsTable.Columns.Add("ID");
           itemsTable.Columns.Add("Text");
           itemsTable.Columns.Add("Certificates");
 
           itemsTable.Rows.Add(new String[] { "1", "1", "CEO", "MCAD" });
           itemsTable.Rows.Add(new String[] { "1", "2", "CTO", "MCP" });
           itemsTable.Rows.Add(new String[] { "2", "3", "UnitManager", "MCSD" });
           itemsTable.Rows.Add(new String[] { "3", "4", "TeamLead", "MCTS" });
           itemsTable.Rows.Add(new String[] { "4", "5", "TechnicalLead", "MCP" });
 
           RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "ID";
           RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ParentID";
           RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
 
           RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "NodeID";
           RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ID";
           RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataTextField = "Text";
           RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
 
           RadOrgChart1.DataBind();
       }


Thanks,
Jayesh Goyani
Nikolay Tsenkov
Telerik team
 answered on 21 Nov 2011
3 answers
181 views
Whenever I run this script, if the file doesn't exist, it saves it twice. If that file name does exist, then it only saves it once. Any ideas why?

Protected Sub submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submit.Click
        Dim targetFileName
        fileOutput.Text = ""
 
        Dim counter = 1
        Dim targetFolder As String = Server.MapPath(attachedFile.TargetFolder)
 
        'check the file upload
        If (attachedFile.UploadedFiles.Count > 0) Then
 
            For Each postedFile As UploadedFile In attachedFile.UploadedFiles
                If Not [Object].Equals(postedFile, Nothing) Then
                    targetFileName = Path.Combine(targetFolder, postedFile.GetNameWithoutExtension() + counter.ToString() + postedFile.GetExtension())
                    While System.IO.File.Exists(targetFileName)
                        counter += 1
                        targetFileName = Path.Combine(targetFolder, postedFile.GetNameWithoutExtension() + counter.ToString() + postedFile.GetExtension())
                    End While
                End If 'if not object
                postedFile.SaveAs(targetFileName)
            Next 'for each uploaded file
 
        Else
 
        End If 'if attachedFile.UploadedFiles.Count
 
End Sub
Kevin
Top achievements
Rank 2
 answered on 21 Nov 2011
1 answer
61 views
Hi,

The bullet points are not showing in the Rad Editor

Pls. suggest me how to go about it.

Thanks in advance
Rumen
Telerik team
 answered on 21 Nov 2011
3 answers
141 views
I have an app where, in any number of places, I open a RadWindow and then the user's interaction with that window will open another RadWindow.

We've been doing this for an age and it all works fine.

Now, however, I have a RadWindow that opens and that window's page includes the definition of another RadWinow with a ContentTemplate.

This, inner, window is defined like this...
<telerik:RadWindow runat="server"
                   ID="winUpload" 
                   Width="650px"
                   Height="500px"
                   Modal="true"
                   ReloadOnShow="true"
                   KeepInScreenBounds="true"
                   ShowContentDuringLoad="false">
  <ContentTemplate>
  <div>
  <!-- content -->
      <div class="clbDialogButtons">
                    <telerik:RadButton ID="UploadConfirmButton"
                                       runat="server"
                                       style="margin-left:3px"
                                       Text="Upload"/>
                      
                    <telerik:RadButton ID="UploadCancelButton"
                                       runat="server"
                                       style="margin-left:3px"
                                       Text="Cancel"
                                       AutoPostBack="false"
                                       CausesValidation="false"
                                       OnClientClicked="ClosePopup"/> 
      </div>
    </div>
  </ContentTemplate>     
</telerik:RadWindow>
and the ClosePopup function is defined thus...
function ClosePopup(sender, e)
{
    GetRadWindow().close();
}

My problem is that when the Close button is clicked in the inner window it closes both the inner window and the containing window.

How do I get just the inner window to close?

--
Stuart


Stuart Hemming
Top achievements
Rank 2
 answered on 21 Nov 2011
1 answer
74 views
I have a Rad Grid placed inside an Ajax Panel. And I have placed an Image Editor control in the nestedViewTemplate. My grid is suppose to load asynchronously so I have a button on click of the button the grid is suppose to load. When I place the Image Editor control the grid fails to load with a Javascript error. If I remove the Image Editor control it works fine. Please find the code snippet. below is the aspx.cs code.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="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">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%"
            LoadingPanelID="LoadingPanel">
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0"
                GridLines="None">
                <MasterTableView>
                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <NestedViewTemplate>
                        <table>
                            <tr>
                                <td>
                                    <telerik:RadImageEditor ImageUrl="Sunset.jpg" ID="RadImageFront" runat="server" Width="100px"
                                        Height="100px">
                                    </telerik:RadImageEditor>
                                </td>
                            </tr>
                        </table>
                    </NestedViewTemplate>
                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                        <HeaderStyle Width="20px" />
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridBoundColumn DataField="Id" FilterControlAltText="Filter column column"
                            HeaderText="Id" UniqueName="column">
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                        </EditColumn>
                    </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False">
                </FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                </HeaderContextMenu>
            </telerik:RadGrid>
        </telerik:RadAjaxPanel>
    </div>
    </form>
</body>
</html>

Below is the code behind code.
public partial class Default : System.Web.UI.Page
{
    protected void Button1_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable("test");
        dt.Columns.Add(new DataColumn("Id"));
        DataRow dr;
        dr = dt.NewRow();
        dr[0] = 5;
        dt.Rows.Add(dr);
        RadGrid1.DataSource = dt;
        RadGrid1.DataBind();
    }
}
 Would appreciate any help....
Niko
Telerik team
 answered on 21 Nov 2011
3 answers
270 views
I modified the RADGrid Basic Filtering demo very slightly to try it out inside a content page. Very little changed other than that I simplified the grid to one column and changed data to be set using the OnNeedsDatasource event.... The grid loads and filters the data but I never see the RADAJAXLoadingPanel. The first time I run it I sometimes see the panel for a tenth of a second but it goes away while the code is still processing ( I put a threading.thread.sleep on the Page load event to be sure). Any clue what I'm doing wrong. I would like it to work like the demo. Listed below is my code:
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WebForm2.aspx.vb" Inherits="_3POC.WebForm2" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <!-- content start -->
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista" ></telerik:RadAjaxLoadingPanel>
      
        <telerik:RadCodeBlock runat="server" ID="radCodeBlock">
            <script type="text/javascript">
                function showFilterItem() {
                    $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
                }
                function hideFilterItem() {
                    $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
                
            </script>
        </telerik:RadCodeBlock>
                  
        <div>
            Show filtering item <input id="Radio1" type="radio" runat="server" name="showHideGroup" checked="true" onclick="showFilterItem()" /><label for="Radio1">Yes</label
            <input id="Radio2" type="radio" runat="server" name="showHideGroup" onclick="hideFilterItem()"/><label for="Radio2" >No</label>
        </div>
        <br/>
        <telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource"
            Width="760px" AllowFilteringByColumn="True" AllowSorting="True"
            PageSize="15" ShowFooter="True" AllowPaging="True" runat="server"
            GridLines="None" EnableLinqExpressions="false" >
            <PagerStyle Mode="NextPrevAndNumeric" />
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"
                ShowFooter="True" TableLayout="Auto">
                <Columns>
                   
                                                <telerik:GridBoundColumn ItemStyle-Width="100%" DataField="FieldName" ShowFilterIcon="false" AllowFiltering="true" CurrentFilterFunction="StartsWith" 
                                                    UniqueName="column" AutoPostBackOnFilter="true" FilterDelay="2000">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                              
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="false" />
            </ClientSettings>
        </telerik:RadGrid>
        <br />
        <asp:Button Text="PostBack" runat="server" ID="Button1" CssClass="button" style="margin:0 20px 0;" />
            Click "PostBack" to see the state of the grid is preserved.
         
          
          
</asp:Content>
Pavlina
Telerik team
 answered on 21 Nov 2011
2 answers
116 views
It seems that as of the Q3 release I am no longer able to add a GridGroupByField in a radgrid when the radgrid's datasource is a list of anonymous type objects.

Here is the group by expressions section in the grid:

<GroupByExpressions>
              <tk:GridGroupByExpression>
                <SelectFields>
                  <tk:GridGroupByField FieldAlias="Sent" FieldName="DateSent" FormatString="{0:D}" HeaderValueSeparator=" on: "></tk:GridGroupByField>
                </SelectFields>
                <GroupByFields>
                  <tk:GridGroupByField FieldName="DateSent" FormatString="{0:D}" SortOrder="Descending" ></tk:GridGroupByField>
                </GroupByFields>
              </tk:GridGroupByExpression>
            </GroupByExpressions>


The following is the anonymous type object declaration from the code behind:
oList.Add(New With {Key .SysID = message.SysID, .From = sender, .Subject = message.EmailSmsLog.Subject, _
                    .MailIcon = emailIcon, .DateSent = dateSent, .TimeSent = timeSent, _
                    .IsRead = message.IsRead})
I then assign the datasource of the radgrid as oList

The exception I get is:
Telerik.Web.UI.ParseException: No property or field 'DateSent' exists in type 'Object'

When I take the group by expressions out of the radgrid, everything works fine.

This code worked in previous versions of the control.

Can anyone confirm that this is a problem in Q3.

Thanks

Mike
MFitzpatrick
Top achievements
Rank 1
 answered on 21 Nov 2011
1 answer
142 views

Hi,

I am using master page and content pages, master page, we have one user control with telerik:RadTabStrip and telerik:RadTab

Each content pages we using above user control to loads the tabs

Problem :- upon clicking on one tab I have to redirect to "http://199.63.yyy.yyy/standard/default.php" url, when I am trying to give url in NavigationUrl of RadTab ( Please check below) , it's redirecting to all new page, I want it to load in the  Right side Content page,

Please help me how can I do that ??

<telerik:RadTab Text="<%$ Resources:Master, TabSettings %>" Value="GraphicSettings"  NavigateUrl="http://199.63.yyy.yyy/standard/default.php" Visible="<%# Model.TabGraphicSettingsVisible  && ProfileHelper.SettingsVisiblity%>" />

Dimitar Terziev
Telerik team
 answered on 21 Nov 2011
5 answers
268 views
Hi,

I am using the rad editor and i need the use the docuement manager in the editor.
I want to path like this one \\Telerik.com\Path\SharedDir\ROOT\Folder_1\

If run my share drive trought run in windows i have acces not problem.

When i use it in the editor and click on the document manager there nothing showing!

What i am missing?

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
       Dim viewPaths As String() = New String() {"C:\PhysicalSource\ROOT", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim uploadPaths As String() = New String() {"C:\PhysicalSource\ROOT\CanUpload", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
Dim deletePaths As String() = New String() {"C:\PhysicalSource\ROOT\Folder_1\CanDelete", "\\Telerik.com\Path\SharedDir\ROOT\Folder_1\"}
    End Sub

In asp

<telerik:RadEditor ID="RadEditor1" runat="server">
</telerik:RadEditor>

Dobromir
Telerik team
 answered on 21 Nov 2011
3 answers
122 views
Hello all,

I am able to unrate other stars by clicking on already rated star now what  I need is to unrate the first star by clicking on it again

Thanks,
aRviN
Niko
Telerik team
 answered on 21 Nov 2011
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?