Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
198 views
We previously used the following in a ToolsFile.xml to allow users to change the current paragraph to a blockquote.

<paragraphs>
    <paragraph name="<blockquote>Block Quote (Full)</blockquote>" value="<blockquote>" />
    <paragraph name="<blockquote class='floatright'>Block Quote (Float Right)</blockquote>" value="<blockquote class='floatright'>" />
    <paragraph name="<blockquote class='floatright'>Block Quote (Float Left)</blockquote>" value="<blockquote class='floatleft'>" />
</paragraphs>

We're moving everything over to format sets in a new ToolsFile.xml. I thought the following would work, but the blockquote options do not appear in the format sets drop-down when a paragraph is selected.

<formatSets>
    <formatSet tag="blockquote" title="<blockquote>Block Quote (Full)</blockquote>" />
    <formatSet tag="blockquote" title="<blockquote>Block Quote (Float Right)</blockquote>">
        <attributes>
            <item name="class" value="floatright" />
        </attributes>
    </formatSet>
    <formatSet tag="blockquote" title="<blockquote>Block Quote (Float Left)</blockquote>">
        <attributes>
            <item name="class" value="floatleft" />
        </attributes>
    </formatSet>
</formatSets>

Is there a way to allow users to change a paragraph to a blockquote using RadEditor?
Rob
Top achievements
Rank 1
 answered on 30 Oct 2012
3 answers
86 views
Hi everyone
I have a question related to copy and paste cell values in a RadGrid.
Is it possible to implement the functionality of Excel?, where user can select cell and drag mouse down to desired row, and value of the first row is copied to all selected rows (drag and repeat values down).

Thanks.
Kostadin
Telerik team
 answered on 30 Oct 2012
3 answers
370 views
Hi ,
             
I'm using Rad Grid and i assigned data table as data source for RadGrid on my project. i need to freeze the Rad Grid first 2 rows excluding Headers. I need solution for this urgent.... help me out on this...

    DataTable dT = HtmlTableParser.ParseTable(pvt);
    MainGrid2.DataSource = dT;
            MainGrid2.DataBind();

Column 0

Column 1

Column 2

Column 3

Column 4

 

2007

2008

2009

2010

Header Value

Capital Exp

Capital Exp

Capital Exp

Capital Exp

Akron

16205.00

2661.00

2215.00

0.00

Allen

0

0

1342.00

1672.00

Alpharetta I

0.00

0.00

0.00

0.00



i need to freeze these Red colored data in this RadGrid.

Column 0

Column 1

Column 2

Column 3

Column 4

this is Header for this Grid. others are data which i get from Data Table. i need to Freeze only the first two rows of the above data table.

I need the solution as soon as possible.

thanks in advance,
Alexis.
Kostadin
Telerik team
 answered on 30 Oct 2012
2 answers
301 views
I have been using a 2012 Q2 release for a good while and have been using the Org Chart. With the Q3 update, I noticed it was now possible to get the node or item ID from client side javascript code (the Edit Employees demo). I've updated my Telerik version to the latest stable Q3 (2012.3.1016) and am getting javascript errors on page load. The error is as follows:

Uncaught TypeError: Cannot read property 'groupItems' of undefined                      ScriptResource.axd:774

I have copied the client side code exactly from the demo for showing/hiding the context menu. The following lines fail with an error (most likely due to the initial error):
var item = org._extractGroupItemFromDomElement(target);
var node = org._extractNodeFromDomElement(target);

The error for these two lines is:
Uncaught TypeError: Cannot read property 'nodes' of undefined                        ScriptResource.axd:788

Here is my definition of the Org Chart in the ASPX file:
<telerik:RadOrgChart ID="RadOrgChart1" runat="server" EnableDragAndDrop="True" OnGroupItemDrop="RadOrgChart1OnGroupItemDrop"
    OnNodeDrop="RadOrgChart1OnNodeDrop" DisableDefaultImage="True" GroupColumnCount="2">
    <GroupEnabledBinding>
        <NodeBindingSettings DataFieldID="TeamID" DataFieldParentID="ReportsTo" DataSourceID="TeamDataSource"/>
        <GroupItemBindingSettings DataFieldID="StaffID" DataFieldNodeID="TeamID" DataTextField="Name" DataSourceID="StaffDataSource"/>
    </GroupEnabledBinding>
    <RenderedFields>
        <NodeFields>
            <telerik:OrgChartRenderedField DataField="TeamName"/>
        </NodeFields>
    </RenderedFields>
    <ItemTemplate>
        <span><%#DataBinder.Eval(Container.DataItem, "Name")%></span>
        <br />
        <span><%#DataBinder.Eval(Container.DataItem, "IsSupervisor").ToString() == "True" ? "Supervisor" : ""%></span>
    </ItemTemplate>
</telerik:RadOrgChart>


Additionally, I should mention I am using the .NET 3.5 assemblies as this org chart is being hosted on a SharePoint 2010 Application Page. I am also using an AjaxManager to ajaxify the org chart based on various controls on the page. However, the same issue happens without the org chart being ajax enabled.


************EDIT: This is easily reproduced by having grouping enabled with two or more groups that do not have a parent set (so two groups that are not linked hierarchically, they are at the same level with no children or parents). Because of the initial error, dragging and dropping is broken and cannot be used to establish a hierarchical definition and thereby fixing the issue.
Kyle Smith
Top achievements
Rank 1
 answered on 30 Oct 2012
0 answers
173 views
Hi!.
I have the following scenario

- Master Page
- Content Page.

In Content Page I Have a Grid
This grid contains a ImageButton "Assume".. When the Admin click on "Assume"  (captura1.png)--> The app execute some actions an assume the user selected and redirect to main page. (captura1.png)

I need show loading panel while this actions and redirect are executing.

I try to use RequestStart and ResponseEnd but doesn't work...

Here is my code:


Content Page:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="/UI/Style/Admin/Admin.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
      
            function loadAssume(UserId) {
                document.getElementById("<%= hfUserId.ClientID %>").value = UserId;
                $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Asumme");
            }

           
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadCodeBlock runat="server">
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Grid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid" LoadingPanelID="LoadginPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnDelete">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid" LoadingPanelID="LoadginPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="gbcbtnDelete">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Grid" LoadingPanelID="LoadginPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
           
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <UC:header runat="server" ID="headerPage" />
    <div id="containerSubWHelp">
        <asp:HiddenField ID="hfUserId" runat="server" />
        <telerik:RadGrid ID="Grid" runat="server" OnNeedDataSource="UserGrid_NeedDataSource"
            OnUpdateCommand="UserGrid_UpdateCommand" OnInsertCommand="UserGrid_InsertCommand"
            AutoGenerateColumns="False" OnItemCommand="UserGrid_ItemCommand" OnPreRender="UserGrid_PreRender"
            OnItemCreated="UserGrid_ItemCreated" OnDeleteCommand="UserGrid_DeleteCommand"
            OnItemDataBound="UserGrid_ItemDataBound">
            <MasterTableView DataKeyNames="Id,IsScanUploadUser">
                <Columns>
                    <telerik:GridClientSelectColumn CommandName="Select" UniqueName="Select" HeaderStyle-Width="28px"
                        Resizable="false" Reorderable="false">
                    </telerik:GridClientSelectColumn>
                    <telerik:GridTemplateColumn UniqueName="IsActive" DataField="IsActive" Reorderable="false"
                        HeaderStyle-Width="55px" AllowFiltering="true" Resizable="false">
                        <ItemTemplate>
                            <asp:ImageButton ID="ActiveIcon" runat="server" CommandName="Active"></asp:ImageButton>
                            <asp:CheckBox ID="lblIsActive" runat="server" Checked='<%# (DataBinder.Eval(Container.DataItem,"IsActive") is DBNull ?false:Eval("IsActive")) %>'
                                Visible="false" />
                                <asp:CheckBox ID="IsScanUploadUser" runat="server" Checked='<%# (DataBinder.Eval(Container.DataItem,"IsScanUploadUser") is DBNull ?false:Eval("IsScanUploadUser")) %>'
                                Visible="false" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                   
                    <telerik:GridTemplateColumn UniqueName="AssumeColumn" HeaderStyle-Width="25px" Resizable="false"
                        AllowFiltering="false" Reorderable="false">
                        <ItemTemplate>
                            <asp:ImageButton ID="AssumeLink" runat="server" ImageUrl="/UI/Images/user_go.png">
                            </asp:ImageButton>

                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                   
                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" HeaderStyle-Width="28px"
                        Reorderable="false" AllowFiltering="false" Resizable="false">
                        <ItemTemplate>
                            <asp:ImageButton ID="EditLink" runat="server" ImageUrl="/UI/Images/pencil.png"></asp:ImageButton>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridEditCommandColumn HeaderStyle-Width="28px" UniqueName="EditCommandColumn"
                        Reorderable="false" ButtonType="ImageButton" EditImageUrl="/UI/Images/grid_edit.png"
                        Resizable="false">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn UniqueName="btnDelete" ButtonType="ImageButton" Reorderable="false"
                        CommandName="Delete" ConfirmDialogHeight="100px" ConfirmDialogWidth="300px" HeaderStyle-Width="28px"
                        Resizable="false" ImageUrl="/UI/Images/delete.png" />
                    <telerik:GridTemplateColumn DataField="Id" UniqueName="Id" Visible="false">
                        <InsertItemTemplate>
                            <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Bind("Id") %>' ReadOnly="true"
                                Enabled="false" />
                        </InsertItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Eval("Id") %>' ReadOnly="true" />
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="FirstName" DataField="FirstName">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtFirstName" Width="90%" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FirstName") %>'></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="rfFirstName" runat="server" ErrorMessage="*" ControlToValidate="txtFirstName"
                                CssClass="validator" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="reFirstName" ControlToValidate="txtFirstName"
                                runat="server" ValidationExpression="^[0-9a-zA-Z\s]{1,249}$" CssClass="validator"
                                Display="Dynamic" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblFirstName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "FirstName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="MiddleName" DataField="MiddleName">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtMiddleName" Width="90%" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "MiddleName") %>'></asp:TextBox>
                            <br />
                              <asp:RegularExpressionValidator ID="reMiddleName" ControlToValidate="txtMiddleName"
                                runat="server" ValidationExpression="^[0-9a-zA-Z]{0,249}$" CssClass="validator"
                                Display="Dynamic" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblMiddleName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "MiddleName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="LastName" DataField="LastName">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtLastName" runat="server" Width="80px" Text='<%# DataBinder.Eval(Container.DataItem, "LastName") %>'></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="rvfLastName" runat="server" ErrorMessage="*" ControlToValidate="txtLastName"
                                CssClass="validator" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="reLastName" ControlToValidate="txtLastName" runat="server"
                                ValidationExpression="^[0-9a-zA-Z\s]{1,249}$" CssClass="validator" Display="Dynamic" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblLastName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "LastName") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Email" DataField="Email">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtEmail" Width="90%" CausesValidation="true" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>'></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="*" ControlToValidate="txtEmail"
                                CssClass="validator" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="revEmail" ControlToValidate="txtEmail" ValidationExpression="^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"
                                CssClass="validator" runat="server" Display="Dynamic"></asp:RegularExpressionValidator>
                            <asp:CustomValidator ValidationGroup="Information" ID="cvEmail" ControlToValidate="txtEmail"
                                CssClass="validator" runat="server" OnServerValidate="cvEmail_ServerValidate"
                                Display="Dynamic"></asp:CustomValidator>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblEmail" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="LoginId" DataField="LoginId">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtLoginId" CausesValidation="true" Width="90%" runat="server"
                                Text='<%# DataBinder.Eval(Container.DataItem, "LoginId") %>'></asp:TextBox>
                            <br />
                            <asp:RequiredFieldValidator ID="rfvLoginId" runat="server" ErrorMessage="*" ControlToValidate="txtLoginId"
                                CssClass="validator" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:CustomValidator ID="cvLoginId" runat="server" ControlToValidate="txtLoginId"
                                CssClass="validator" ValidateEmptyText="True" Display="Dynamic" OnServerValidate="cvLoginId_ServerValidate" />
                            <asp:RegularExpressionValidator ID="reLogin" ControlToValidate="txtLoginId" runat="server"
                                ValidationExpression="^[0-9a-zA-Z\s]{1,249}$" CssClass="validator" Display="Dynamic" />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblLoginId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "LoginId") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Phone" DataField="Phone">
                        <EditItemTemplate>
                            <telerik:RadMaskedTextBox ID="txtPhone" runat="server" MaxLength="11" CssClass="textBoxPopUp"
                                Text='<%# DataBinder.Eval(Container.DataItem, "Phone") %>' Mask="(###) ###-####-####"
                                DisplayMask="(###) ###-####-####">
                            </telerik:RadMaskedTextBox>
                            <br />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblPhone" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Phone") %>'></asp:Label>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="LastLogin" SortExpression="LastLogin">
                        <ItemTemplate>
                            <asp:Label ID="lblLastLogin" runat="server" Style="font-size: 10px" Enabled="false"
                                Text='<%# DataBinder.Eval(Container.DataItem, "LastLogin") %>' />
                                <br />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="IsSuper" DataField="IsSuper">
                        <EditItemTemplate>
                            <asp:CheckBox ID="chkIsSuper" runat="server" Checked='<%# IsSuperUser(DataBinder.Eval(Container.DataItem, "Id").ToString()) %>' />
                            <br />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="lblIsSuper" runat="server" Enabled="false" Checked='<%#Convert.ToBoolean(Eval("IsSuper"))%>' />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <CommandItemTemplate>
                    <UC:AddButtons ID="AddButtons" runat="server" />
                </CommandItemTemplate>
            </MasterTableView><ClientSettings>
                <ClientEvents OnRowDblClick="rowDblClick" />
            </ClientSettings>
        </telerik:RadGrid>
    </div>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="UserFormDialog" runat="server" Height="600px" Width="800px"
                Skin="Vista" BackColor="Aquamarine" ReloadOnShow="true" ShowContentDuringLoad="false"
                Modal="true" VisibleStatusbar="false" Behaviors="Move, Close" Animation="FlyIn"
                IconUrl="/UI/Images/user.png" />


                
        </Windows>
    </telerik:RadWindowManager>
    <asp:HiddenField ID="HiddenName" runat="server" Visible="false" />
</asp:Content>

.cs

this method is called from UserGrid_ItemCreated
  public static void AssumeUserSettings(GridDataItem item)
        {
            ResourceManager resources = WebSearch.Components.GeneralFunctions.Resources.GetAdminResources("Grids");
            string culture = WebSearch.Components.GeneralFunctions.Variables.CurrentCulture();


            var assumeLink = (ImageButton)item.FindControl("AssumeLink");
            assumeLink.ToolTip = resources.GetString(assumeLink.ID, new CultureInfo(culture));
            assumeLink.AlternateText = resources.GetString(assumeLink.ID, new CultureInfo(culture));
            assumeLink.Attributes["onclick"] = String.Format("return loadAssume('{0}');",
                                                             item.OwnerTableView.DataKeyValues[item.ItemIndex]["Id"]);

        }


 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
          


            switch (e.Argument)
            {
                case "Asumme":
  // I need start show loading 
                    AssumeUser();
  // I need end show loading  

                    break;

}}


 private void AssumeUser()
        {
            (Page.Master.FindControl("lblAssume") as Label).Visible = true;
            (Page.Master.FindControl("lnkCloseAssume") as LinkButton).Visible = true;
            (Page.Master.FindControl("lblogOff") as LinkButton).Visible = false;
            Session["LastUrl"] = "~" + Request.Url.AbsolutePath;
            new WSOrganization().SavePreferences();
            WebSearch.Components.Init.PreferencesUsers.LoadUserSettings(Convert.ToInt32(hfUserId.Value), true);
            Session["flag"] = true;
        }


Master Page.asp

 <telerik:RadAjaxPanel ID="pnlPanelApp" runat="server" Height="100%" Width="100%">
   
        <div id="UserOnline" runat="server">
            <asp:Label ID="lblAssume" runat="server" CssClass="UserOnlineText" />
            <asp:LinkButton ID="lblUserOnline" runat="server" CssClass="UserOnlineText" OnClick="lblUserOnline_Click"></asp:LinkButton>
            <asp:LinkButton ID="lblogOff" runat="server" CssClass="UserOnlineText" OnClick="lblogOff_Click"></asp:LinkButton>
            <asp:LinkButton ID="lnkCloseAssume" runat="server" CssClass="UserOnlineText" OnClick="lnkCloseAssume_Click"></asp:LinkButton>
        </div>
        
            <div id="header" runat="server" />
           
            <div id="centerBody" runat="server">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            
            <div id="footer" runat="server" />
        
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <Windows>
                <telerik:RadWindow ID="Dialog" runat="server" Height="200px" Width="300px" Skin="Vista"
                    Left="15%" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" VisibleStatusbar="false"
                    Behaviors="Close" />
                <telerik:RadWindow ID="InformationDialog" runat="server" Height="100px" Width="300px"
                    Skin="Vista" Left="15%" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true"
                    VisibleStatusbar="false" Behaviors="Close" />
                <telerik:RadWindow ID="UserAssumeDialog" runat="server" Height="80px" Width="250px"
                    Skin="Vista" Left="15%" ReloadOnShow="true" ShowContentDuringLoad="true" Modal="true"
                    VisibleStatusbar="false" Behaviors="Close" />
            </Windows>
        </telerik:RadWindowManager>
        <UC:Notification ID="Notification" runat="server" />
          <UC:RadWindowsManager ID="WindowManagerTopMenu" runat="server"></UC:RadWindowsManager>
          
    </telerik:RadAjaxPanel>

July
Top achievements
Rank 2
 asked on 30 Oct 2012
3 answers
58 views
RadAsyncFileUpload is not working on ipad and iphone4/4s.  However it is working on iphone5.  How do I fix this issue?
The Telerik controls version that I'm working with is 2011.3.1305.35.

Thank you!!
Plamen
Telerik team
 answered on 30 Oct 2012
1 answer
72 views
Version: AJAX 2012 Q2 912
Browser: IE8

I got a RadFileExplorer using the DBContentProvider to store the files on a MSSQL server.
When I'm downloading the file it changes the pound sign "#" to under score "_".

For example:

Jenny Baxter PDP #4.pdf  -->  Jenny Baxter PDP _4.pdf



Vessy
Telerik team
 answered on 30 Oct 2012
1 answer
112 views
Hi,

We use 2 grid (not connected) on one page. One grid is in Edit Mode the other shows a attachment

When I download an attachment, then update the other grid with new entered data, the data is not updated
when I push the Update button. It returns to the initial data. When I try to update again it saves the data.  

Anyone any Idea ?

The code I use for downloading the attachment :
If
e.CommandName = RadGrid.DownloadAttachmentCommandName Then
                e.Canceled = True
                Dim args As GridDownloadAttachmentCommandEventArgs = TryCast(e, GridDownloadAttachmentCommandEventArgs)
                Dim fileName As String = args.FileName
 
                'Dim column As String = args.CommandSource
                Dim strcolumn As String = args.AttachmentKeyValues("ColumnUniqueName")
                Dim strConnectionString As String = DotNetNuke.Data.SqlDataProvider.Instance.ConnectionString
                Dim conn As New SqlConnection(strConnectionString)
                'Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("TelerikConnectionString").ConnectionString)
                Dim strTable As String = CType(Settings("TableName"), String)
                Dim strUniqueId As String = CType(Settings("UniqueId"), String)
                Dim strid As String = (DirectCast(e.Item, GridDataItem)).GetDataKeyValue(strUniqueId).ToString()
                Dim comm As New SqlCommand("SELECT [" + strcolumn + "]  FROM [" + strTable + "] WHERE [" + strUniqueId + "]=" + strid, conn)
                'comm.Parameters.Add(New SqlParameter("@ID", attachmentId))
 
                Dim adapter As New SqlDataAdapter(comm)
                Dim data As New DataSet()
                adapter.Fill(data)
 
                Dim binaryData As Byte() = DirectCast(data.Tables(0).Rows(0)(strcolumn), Byte())
 
                Response.Clear()
                'Response.ClearHeaders() '***
                Response.Cache.SetCacheability(HttpCacheability.Private) '***
                Response.ContentType = "application/octet-stream"
                Response.AddHeader("content-disposition", "attachment; filename=" + fileName)
                Response.BinaryWrite(binaryData)
                Response.[End]()
                
 
            End If
Andrey
Telerik team
 answered on 30 Oct 2012
3 answers
74 views
I have a radGrid that is grouped by a certain text field. When GroupsDefaultExpanded is true (or not specified) clicking the Edit button open the popup form template correctly. But when I set GroupsDefaultExpanded to false, the Edit button no longer opens the editor popup. Clicking the Edit buttons posts back to the server, the ItemCommand event is executed with CommandName equal to "Edit", but then the group collapses itself, and the editor never appears! Clicking the AddItem link does open the editor successfully. If I change nothing more than the value of GroupsDefaultExpanded this behavior appears and disappears, so it is obviously related.
Eyup
Telerik team
 answered on 30 Oct 2012
1 answer
37 views
Hello,

I am looking at the basic samples for creating a TreeList of a directory structure and I see several examples but none that fall inline with my thinking. So perhaps someone here can set me straight with an example or explanation.

In my TreeList I have the following columns I wanted bound. Name, Author, Size, Created, Modified.

All the samples I saw used an xml file and other examples used a string array. These scenarios have me wondering perhaps incorrectly about my approach. I was thinking to create a custom object that inherits from IDictionary<string, string, String, DateTime, DateTime> or similiar. This way I could populate the object with both DirInfo as well as MetaData such as Author. In my mind I was thinking I could just then bind the ListView to this object.

Is there a tutorial or sample that I can educate myself on a custom solution using the ASP .NET ListView?

FYI .NET 4.0

Thank You
JB
Andrey
Telerik team
 answered on 30 Oct 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?